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

我最近使用的是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] ` 

看起来您已经配置了在工作区Intranet上使用缓存代理。 当您未连接到该网络时,代理设置无效,更新/安装将失败。

解决这个问题的最佳方法取决于您在工作时更新系统的频率,而不是工作时间:

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

     sudo apt-get -o Acquire::http::Proxy=false update 
  2. 如果您很少使用工作代理,那么您可以考虑完全删除或禁用它:这可能是最容易使用synaptic包管理器,通过转到设置 – > 首选项然后选择网络选项卡,并确保它设置为Direct connection to the internet

    突触代理设置

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

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

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

     Acquire::http::Proxy DIRECT 
  3. 如果你想要自动检测指定的代理是否可用,并且如果不是,则进行直接连接,那么显然有一种方法可以做到这一点 – 请参阅前面的答案如何忽略代理如果无法使用?