How can I install the package iftop?
I installed Ubuntu 12.04 and it's not updating when I try. I changed may server address for Ubuntu and DNS but it's still not working. I'm trying to install iotop but it doesn't. I have already changed my Ubuntu server location and changed DNS to Google's default server. I have already installed Zental correctly, but iotop doesn't appear, how can I install it?
Here the error log:
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
error:
root@ubuntu:~# sudo apt-get install iftop
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package iftop
Solution 1:
From your comment, it seems that you are trying to install iftop
, but it's telling you it's not there.
iftop
is in the Universe repository, so you need to enable it. Visit this question: How do I enable the "Universe" repository? to enable it. When you enable it, first do apt-get update
, then try apt-get install iftop
.
The correct command to update your package list is:
sudo apt-get update
Then, the command to actually upgrade your Ubuntu (i.e. download and install the newer versions of packages) is:
sudo apt-get upgrade
See my answer to this question: https://askubuntu.com/a/344363/52726 for a little bit more explanation on the difference between
apt-get update
andapt-get upgrade
.
The command to install packages (or "applications") is:
sudo apt-get install <packagename>
Where <packagename>
is the name of the application. For example skype
, vlc
, and so on.
The command you ran, apt-get install update
is telling Ubuntu to install a package called update
, which doesn't exist.