我安装了 Ubuntu 12.04,但尝试更新时它没有更新。我更改了 Ubuntu 的服务器地址和 DNS,但仍然不起作用。我尝试安装 iotop,但不起作用。我已经更改了我的 Ubuntu 服务器位置,并将 DNS 更改为 Google 的默认服务器。我已经正确安装了 Zental,但 iotop 没有出现,我该如何安装它?
这里是错误日志:
root@ubuntu:~# sudo apt-get update
Ign http://archive.zentyal.org 3.0 InRelease
Err http://archive.zentyal.org 3.0 Release.gpg
Unable to connect to archive.zentyal.org:http:
Ign http://archive.zentyal.org 3.0 Release
Ign http://archive.zentyal.org 3.0/extra TranslationIndex
Ign http://archive.zentyal.org 3.0/main TranslationIndex
Err http://archive.zentyal.org 3.0/main i386 Packages
Unable to connect to archive.zentyal.org:http:
Err http://archive.zentyal.org 3.0/extra i386 Packages
Unable to connect to archive.zentyal.org:http:
Err http://archive.zentyal.org 3.0/extra Translation-en_US
Unable to connect to archive.zentyal.org:http:
Err http://archive.zentyal.org 3.0/extra Translation-en
Unable to connect to archive.zentyal.org:http:
Err http://archive.zentyal.org 3.0/main Translation-en_US
Unable to connect to archive.zentyal.org:http:
Err http://archive.zentyal.org 3.0/main Translation-en
Unable to connect to archive.zentyal.org:http:
Ign http://ppa.launchpad.net precise InRelease
Err http://ppa.launchpad.net precise Release.gpg
Unable to connect to ppa.launchpad.net:http:
Ign http://ppa.launchpad.net precise Release
Ign http://ppa.launchpad.net precise/main TranslationIndex
Err http://ppa.launchpad.net precise/main Sources
Unable to connect to ppa.launchpad.net:http:
Err http://ppa.launchpad.net precise/main i386 Packages
Unable to connect to ppa.launchpad.net:http:
Err http://ppa.launchpad.net precise/main Translation-en_US
Unable to connect to ppa.launchpad.net:http:
Err http://ppa.launchpad.net precise/main Translation-en
Unable to connect to ppa.launchpad.net:http:
Ign http://archive.canonical.com precise InRelease
Err http://archive.canonical.com precise Release.gpg
Unable to connect to archive.canonical.com:http: [IP: 91.189.92.191 80]
Ign http://archive.canonical.com precise Release
Ign http://archive.canonical.com precise/partner TranslationIndex
Err http://archive.canonical.com precise/partner Sources
Unable to connect to archive.canonical.com:http: [IP: 91.189.92.191 80]
Err http://archive.canonical.com precise/partner i386 Packages
Unable to connect to archive.canonical.com:http: [IP: 91.189.92.191 80]
Err http://archive.canonical.com precise/partner Translation-en_US
Unable to connect to archive.canonical.com:http: [IP: 91.189.92.191 80]
Err http://archive.canonical.com precise/partner Translation-en
Unable to connect to archive.canonical.com:http: [IP: 91.189.92.191 80]
Ign http://us.archive.ubuntu.com precise InRelease
Ign http://us.archive.ubuntu.com precise-updates InRelease
Ign http://us.archive.ubuntu.com precise-backports InRelease
Err http://us.archive.ubuntu.com precise Release.gpg
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-updates Release.gpg
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-backports Release.gpg
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Ign http://us.archive.ubuntu.com precise Release
Ign http://us.archive.ubuntu.com precise-updates Release
Ign http://us.archive.ubuntu.com precise-backports Release
Ign http://us.archive.ubuntu.com precise/main TranslationIndex
Ign http://us.archive.ubuntu.com precise/multiverse TranslationIndex
Ign http://us.archive.ubuntu.com precise/universe TranslationIndex
Ign http://us.archive.ubuntu.com precise-updates/main TranslationIndex
Ign http://us.archive.ubuntu.com precise-updates/multiverse TranslationIndex
Ign http://us.archive.ubuntu.com precise-updates/universe TranslationIndex
Ign http://us.archive.ubuntu.com precise-backports/main TranslationIndex
Ign http://us.archive.ubuntu.com precise-backports/multiverse TranslationIndex
Ign http://us.archive.ubuntu.com precise-backports/universe TranslationIndex
Err http://us.archive.ubuntu.com precise/main Sources
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise/universe Sources
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise/multiverse Sources
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise/main i386 Packages
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise/universe i386 Packages
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise/multiverse i386 Packages
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-updates/main Sources
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-updates/universe Sources
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-updates/multiverse Sources
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-updates/main i386 Packages
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-updates/universe i386 Packages
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-backports/main Sources
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-backports/universe Sources
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-backports/multiverse Sources
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-backports/main i386 Packages
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-backports/universe i386 Packages
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-backports/multiverse i386 Packages
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise/main Translation-en_US
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise/main Translation-en
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise/multiverse Translation-en_US
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise/multiverse Translation-en
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise/universe Translation-en_US
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise/universe Translation-en
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-updates/main Translation-en_US
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-updates/main Translation-en
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-updates/multiverse Translation-en_US
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-updates/multiverse Translation-en
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-updates/universe Translation-en_US
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-updates/universe Translation-en
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-backports/main Translation-en_US
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-backports/main Translation-en
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-backports/multiverse Translation-en_US
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-backports/multiverse Translation-en
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-backports/universe Translation-en_US
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com precise-backports/universe Translation-en
Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.13 80]
23% [Connecting to security.ubuntu.com (91.189.91.14)] [Connecting to archive.ubuntu.com (91.189.92.202)]
ping:
root@ubuntu:~# ping -c4 google.com
PING google.com (202.166.193.187) 56(84) bytes of data.
64 bytes from 187.cache.google.com (202.166.193.187): icmp_req=1 ttl=62 time=3.08 ms
64 bytes from 187.cache.google.com (202.166.193.187): icmp_req=2 ttl=62 time=4.30 ms
64 bytes from 187.cache.google.com (202.166.193.187): icmp_req=3 ttl=62 time=3.50 ms
64 bytes from 187.cache.google.com (202.166.193.187): icmp_req=4 ttl=62 time=4.34 ms
错误:
root@ubuntu:~# sudo apt-get install iftop
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package iftop
答案1
从您的评论来看,似乎您正在尝试安装iftop
,但它告诉您它不存在。
iftop
在 Universe 存储库中,因此您需要启用它。请访问此问题:我如何启用“Universe”存储库?启用它。启用它时,请先执行apt-get update
,然后尝试apt-get install iftop
。
更新软件包列表的正确命令是:
sudo apt-get update
然后,实际升级 Ubuntu(即下载并安装新版本的软件包)的命令是:
sudo apt-get upgrade
请参阅我对这个问题的回答:https://askubuntu.com/a/344363/52726进一步解释一下
apt-get update
和之间的区别apt-get upgrade
。
安装软件包(或“应用程序”)的命令是:
sudo apt-get install <packagename>
其中<packagename>
是应用程序的名称。例如skype
、vlc
等等。
您运行的命令apt-get install update
告诉 Ubuntu 安装一个名为 的包update
,但该包不存在。