linux - 在 kubuntu 中安装软件

标签 linux apt apt-get ubuntu

我最近安装了 kubuntu。我可以从 muon 软件中心安装软件。但是当我尝试从终端执行此操作时,我收到错误。例如,在尝试更新时,我得到:

Err http://archive.canonical.com quantal InRelease

Err http://archive.canonical.com quantal Release.gpg 
  Unable to connect to archive.canonical.com:http:
Err http://archive.ubuntu.com quantal InRelease      

Err http://archive.ubuntu.com quantal Release.gpg    
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.201 80]
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/quantal/InRelease  

W: Failed to fetch http://archive.canonical.com/dists/quantal/InRelease  

W: Failed to fetch http://archive.canonical.com/dists/quantal/Release.gpg  Unable to connect to archive.canonical.com:http:

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/quantal/Release.gpg  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.201 80]

W: Some index files failed to download. They have been ignored, or old ones used instead.

同样,当我尝试安装 git-core 时,我得到:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  git git-man liberror-perl
Suggested packages:
  git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn
  git-email git-gui gitk gitweb
The following NEW packages will be installed:
  git git-core git-man liberror-perl
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,704 kB of archives.
After this operation, 15.4 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://archive.ubuntu.com/ubuntu/ quantal/main liberror-perl all 0.17-1
  Could not connect to archive.ubuntu.com:80 (91.189.92.202). - connect (111: Connection refused) [IP: 91.189.92.202 80]
Err http://archive.ubuntu.com/ubuntu/ quantal/main git-man all 1:1.7.10.4-1ubuntu1
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.202 80]
Err http://archive.ubuntu.com/ubuntu/ quantal/main git i386 1:1.7.10.4-1ubuntu1
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.202 80]
Err http://archive.ubuntu.com/ubuntu/ quantal/main git-core all 1:1.7.10.4-1ubuntu1
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.202 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libe/liberror-perl/liberror-perl_0.17-1_all.deb  Could not connect to archive.ubuntu.com:80 (91.189.92.202). - connect (111: Connection refused) [IP: 91.189.92.202 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/git/git-man_1.7.10.4-1ubuntu1_all.deb  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.202 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/git/git_1.7.10.4-1ubuntu1_i386.deb  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.202 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/git/git-core_1.7.10.4-1ubuntu1_all.deb  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.202 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我该如何处理这个问题。我正在代理服务器后面使用互联网,如果这很重要的话。

最佳答案

您应该将代理配置添加到 /etc/apt/apt.conf

Acquire::http::Proxy "http://proxy-ip-or-hostname:port";

例如:

Acquire::http::Proxy "http://192.168.0.1:3128";

或通过身份验证

Acquire::http::Proxy "http://user:pass@192.168.0.1:3128";

关于linux - 在 kubuntu 中安装软件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15476361/

相关文章:

linux - Linux上如何区分手动安装的包和依赖项

Docker - apt-get 连接在 Debian 上被拒绝,但在 Ubuntu 上可以工作

java - 如何在 Swing 中停止重复的 keyPressed()/keyReleased() 事件

linux - 在我的代码末尾进行系统调用后出现程序集段错误

ubuntu - 如何使用 apt-get 在 Ubuntu 上安装最新的 uWSGI/stable

Docker RUN apt-get update 返回非零代码 :132

debian - 如何删除和清除 apt-get 安装的所有软件包?

linux - 如何修复 Debian Lenny 中的 apt-get 更新以便可以安装 PostgreSql 9.1

linux - 如何从 perf stat 的输出中解析指令数和耗时

apt - 如何让 Chef 在运行其他 Recipe 之前运行 apt-get update