除非在一个网络上,否则无法更新

除非在一个网络上,否则无法更新

我最近在使用 ubuntu12.04 LTS,当我尝试更新、安装应用程序和升级时,除非我在一个网络上,否则我会收到错误消息。这是我在工作场所找到的 wifi 网络,我认为安装了一个应用程序来执行此操作。无论如何,这是我在其他网络中尝试更新时得到的全部信息。`尽管这不是全部

Err http://deb.playonlinux.com maverick Release.gpg                            
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://deb.opera.com stable Release.gpg                                    
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://repo.steampowered.com precise Release.gpg                           
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://fl.archive.ubuntu.com precise Release.gpg                           
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net karmic Release.gpg                                
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://extras.ubuntu.com precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://dl.google.com stable Release.gpg                                    
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://security.ubuntu.com precise-security Release                        
Ign http://archive.getdeb.net precise-getdeb Release                           
Ign http://deb.opera.com stable Release                                        
Ign http://deb.playonlinux.com maverick Release                                
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://repo.steampowered.com precise Release                               
Err http://fl.archive.ubuntu.com precise-updates Release.gpg                   
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://dl.google.com stable Release.gpg                                    
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://extras.ubuntu.com precise Release                                   
Ign http://deb.playonlinux.com maverick/main i386 Packages/DiffIndex           
Ign http://security.ubuntu.com precise-security/main Sources/DiffIndex         
Ign http://archive.getdeb.net precise-getdeb/apps i386 Packages/DiffIndex      
Ign http://deb.opera.com stable/non-free i386 Packages/DiffIndex               
Ign http://repo.steampowered.com precise/steam i386 Packages/DiffIndex         
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://dl.google.com stable Release.gpg                                    
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://fl.archive.ubuntu.com precise-backports Release.gpg                 
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://extras.ubuntu.com precise/main Sources/DiffIndex                    
Ign http://deb.playonlinux.com maverick/main TranslationIndex                  
Ign http://archive.getdeb.net precise-getdeb/apps TranslationIndex             
Ign http://security.ubuntu.com precise-security/restricted Sources/DiffIndex   
Ign http://deb.opera.com stable/non-free TranslationIndex                      
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://repo.steampowered.com precise/steam TranslationIndex                
Ign http://dl.google.com stable Release                                        
Ign http://extras.ubuntu.com precise/main i386 Packages/DiffIndex              
Err http://fl.archive.ubuntu.com precise-proposed Release.gpg                  
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://security.ubuntu.com precise-security/universe Sources/DiffIndex     
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://dl.google.com stable Release                                        
Ign http://fl.archive.ubuntu.com precise Release                               
Ign http://extras.ubuntu.com precise/main TranslationIndex                     
Ign http://security.ubuntu.com precise-security/multiverse Sources/DiffIndex   
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://dl.google.com stable Release                                        
Ign http://fl.archive.ubuntu.com precise-updates Release                       
Ign http://security.ubuntu.com precise-security/main i386 Packages/DiffIndex   
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-backports Release                     
Ign http://dl.google.com stable/main i386 Packages/DiffIndex                   
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-proposed Release                      
Ign http://dl.google.com stable/main TranslationIndex                          
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://dl.google.com stable/main i386 Packages/DiffIndex                   
Ign http://fl.archive.ubuntu.com precise/main Sources/DiffIndex                
Ign http://fl.archive.ubuntu.com precise/restricted Sources/DiffIndex          
Ign http://fl.archive.ubuntu.com precise/universe Sources/DiffIndex            
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://dl.google.com stable/main TranslationIndex                          
Ign http://fl.archive.ubuntu.com precise/multiverse Sources/DiffIndex          
Ign http://fl.archive.ubuntu.com precise/main i386 Packages/DiffIndex          
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://dl.google.com stable/main i386 Packages/DiffIndex                   
Ign http://fl.archive.ubuntu.com precise/restricted i386 Packages/DiffIndex    
Ign http://fl.archive.ubuntu.com precise/universe i386 Packages/DiffIndex      
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://dl.google.com stable/main TranslationIndex                          
Ign http://fl.archive.ubuntu.com precise/multiverse i386 Packages/DiffIndex    
Ign http://fl.archive.ubuntu.com precise/main TranslationIndex                 
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://security.ubuntu.com precise-security/restricted i386 Packages/DiffIndex
Ign http://security.ubuntu.com precise-security/universe i386 Packages/DiffIndex
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://deb.opera.com stable/non-free i386 Packages                         
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://security.ubuntu.com precise-security/multiverse i386 Packages/DiffIndex
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://security.ubuntu.com precise-security/main TranslationIndex          
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://security.ubuntu.com precise-security/multiverse TranslationIndex    
Ign http://security.ubuntu.com precise-security/restricted TranslationIndex    
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise/multiverse TranslationIndex           
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://security.ubuntu.com precise-security/universe TranslationIndex      
Ign http://fl.archive.ubuntu.com precise/restricted TranslationIndex           
Ign http://fl.archive.ubuntu.com precise/universe TranslationIndex             
Err http://extras.ubuntu.com precise/main Sources                              
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/main Sources/DiffIndex        
Err http://repo.steampowered.com precise/steam i386 Packages                   
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/restricted Sources/DiffIndex  
Err http://repo.steampowered.com precise/steam Translation-en_US               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://extras.ubuntu.com precise/main i386 Packages                        
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/universe Sources/DiffIndex    
Err http://repo.steampowered.com precise/steam Translation-en                  
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/multiverse Sources/DiffIndex  
Err http://extras.ubuntu.com precise/main Translation-en_US                    
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/main i386 Packages/DiffIndex  
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://extras.ubuntu.com precise/main Translation-en                       
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/restricted i386 Packages/DiffIndex
Ign http://fl.archive.ubuntu.com precise-updates/universe i386 Packages/DiffIndex
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://deb.opera.com stable/non-free Translation-en_US                     
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://deb.opera.com stable/non-free Translation-en                        
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://deb.playonlinux.com maverick/main i386 Packages                     
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://archive.getdeb.net precise-getdeb/apps i386 Packages                
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://archive.getdeb.net precise-getdeb/apps Translation-en_US            
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://deb.playonlinux.com maverick/main Translation-en_US                 
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://archive.getdeb.net precise-getdeb/apps Translation-en               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://deb.playonlinux.com maverick/main Translation-en                    
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/multiverse i386 Packages/DiffIndex
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/main TranslationIndex         
Ign http://fl.archive.ubuntu.com precise-updates/multiverse TranslationIndex   
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://ppa.launchpad.net karmic Release                                    
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://fl.archive.ubuntu.com precise-updates/restricted TranslationIndex   
Ign http://fl.archive.ubuntu.com precise-updates/universe TranslationIndex     
Ign http://fl.archive.ubuntu.com precise-backports/main Sources/DiffIndex      
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://fl.archive.ubuntu.com precise-backports/restricted Sources/DiffIndex
Ign http://fl.archive.ubuntu.com precise-backports/universe Sources/DiffIndex  
Ign http://ppa.launchpad.net precise Release                                   
Ign http://fl.archive.ubuntu.com precise-backports/multiverse Sources/DiffIndex
Ign http://fl.archive.ubuntu.com precise-backports/main i386 Packages/DiffIndex
Err http://dl.google.com stable/main i386 Packages                             
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-backports/restricted i386 Packages/DiffIndex
Ign http://fl.archive.ubuntu.com precise-backports/universe i386 Packages/DiffIndex
Err http://dl.google.com stable/main Translation-en_US                         
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-backports/multiverse i386 Packages/DiffIndex
Ign http://fl.archive.ubuntu.com precise-backports/main TranslationIndex       
Err http://dl.google.com stable/main Translation-en                            
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://dl.google.com stable/main i386 Packages                             
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://dl.google.com stable/main Translation-en_US                         
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://dl.google.com stable/main Translation-en                            
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://dl.google.com stable/main i386 Packages                             
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://ppa.launchpad.net precise Release                                   
Err http://dl.google.com stable/main Translation-en_US                         
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://ppa.launchpad.net precise Release                                   
Err http://dl.google.com stable/main Translation-en                            
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://fl.archive.ubuntu.com precise-backports/multiverse TranslationIndex 
Ign http://fl.archive.ubuntu.com precise-backports/restricted TranslationIndex 
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   

Err http://security.ubuntu.com precise-security/multiverse Translation-en_US   
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://ppa.launchpad.net precise/main i386 Packages/DiffIndex              
Err http://security.ubuntu.com precise-security/multiverse Translation-en      
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://ppa.launchpad.net precise/main TranslationIndex                     
Ign http://ppa.launchpad.net precise/main Sources/DiffIndex                    
Ign http://ppa.launchpad.net precise/main i386 Packages/DiffIndex              
Ign http://ppa.launchpad.net precise/main TranslationIndex                     
Ign http://ppa.launchpad.net precise/main Sources/DiffIndex                    
Ign http://ppa.launchpad.net precise/main i386 Packages/DiffIndex              
Ign                   
22% [Connecting to aptcache.intranet.ics] [Connecting to aptcache.intranet.ics]
`

答案1

看起来您已配置apt为在工作场所内联网上使用缓存代理。当您未连接到该网络时,代理设置无效,更新/安装将失败。

解决此问题的最佳方法取决于您在工作时和工作之外更新系统的频率,可以执行以下操作之一:

  1. 如果你通常在工作时更新,但想apt-get在连接到另一个网络时偶尔运行,则应该能够通过-o Acquire::http::Proxy=false在命令中添加来覆盖命令行上的配置设置,例如

    sudo apt-get -o Acquire::http::Proxy=false update
    
  2. 如果您很少使用工作代理,那么您可以考虑将其完全删除或禁用:使用synaptic包管理器可能是最简单的方法,方法是转到Settings--> Preferences,然后选择Network选项卡,并确保将其设置为Direct connection to the internet

    Synaptic 代理设置

    如果你没有,synaptic你可以手动编辑代理设置 - 你应该在文件/etc/apt/apt.conf或其中一个片段中找到它们/etc/apt/apt.conf.d/,它可能看起来像

    Acquire::http::Proxy "http://aptcache.intranet.ics:3142"
    

    您可以将其注释掉,也可以明确设置为

    Acquire::http::Proxy DIRECT
    
  3. 如果您想apt自动检测指定的代理是否可用,并在不可用时建立直接连接,那么显然也有办法做到这一点 - 请参阅之前的答案如果不可用,我该如何忽略代理?

相关内容