在kubuntu上安装软件

问题描述:

我最近安装了kubuntu。我可以从μon软件中心安装软件。但是当我尝试从终端上这样做时,我会遇到错误。例如在尝试更新,我得到:在kubuntu上安装软件

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的核心,我得到:

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? 

如何处理这个问题。如果有问题,我在代理服务器后面使用互联网。

+2

你的问题属于更多的超级用户,而不是计算器。 – Jean 2013-03-18 12:03:12

+1

或askubuntu,最好。 – geoffspear 2013-03-18 12:03:24

您应该添加您的代理配置,以/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:[email protected]:3128"; 
+0

我一直有这个问题。这似乎是一个永久的解决方案。谢谢! – sudeepdino008 2013-03-18 12:13:16