如何安装 iftop 软件包?

0 software-installation

我安装了 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)]
Run Code Online (Sandbox Code Playgroud)

平:

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
Run Code Online (Sandbox Code Playgroud)

错误:

root@ubuntu:~# sudo apt-get install iftop
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package iftop
Run Code Online (Sandbox Code Playgroud)

Ala*_*Ali 8

从您的评论来看,您似乎正在尝试安装iftop,但它告诉您它不在那里。

iftop位于 Universe 存储库中,因此您需要启用它。访问这个问题:如何启用“Universe”存储库?启用它。当您启用它时,首先执行apt-get update,然后尝试apt-get install iftop


更新包列表的正确命令是:

sudo apt-get update
Run Code Online (Sandbox Code Playgroud)

然后,实际升级您的 Ubuntu(即下载并安装较新版本的软件包)的命令是:

sudo apt-get upgrade
Run Code Online (Sandbox Code Playgroud)

见我回答这个问题:https://askubuntu.com/a/344363/52726一点点的区别更多的解释apt-get updateapt-get upgrade

安装包(或“应用程序”)的命令是:

sudo apt-get install <packagename>
Run Code Online (Sandbox Code Playgroud)

<packagename>应用程序的名称在哪里。例如skype,,vlc等等。

您运行的命令apt-get install update告诉 Ubuntu 安装一个名为 的包update,该包不存在。