sudo apt-get autoremove openjdk-7-jre 之后 sudo apt-get update 出现错误

sudo apt-get autoremove openjdk-7-jre 之后 sudo apt-get update 出现错误

执行此命令之前一切都很好sudo apt-get autoremove openjdk-7-jre。 删除此 openjdk-7-jre 后,当我尝试时,sudo apt-get update出现以下错误:

0% [Working]

Err http://ppa.launchpad.net precise Release.gpg

  Something wicked happened resolving 'ppa.launchpad.net:http' (-5 - No address associated with hostname)


0% [Connecting to security.ubuntu.com] [Connecting to extras.ubuntu.com]
                                                                A        
Err http://extras.ubuntu.com precise Release.gpg

  Something wicked happened resolving 'extras.ubuntu.com:http' (-5 - No address associated with hostname)


0% [Connecting to security.ubuntu.com] [Connecting to ppa.launchpad.net]

Err http://security.ubuntu.com precise-security Release.gpg

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)



0% [Connecting to ppa.launchpad.net]

Ign http://ppa.launchpad.net precise Release


4% [Connecting to extras.ubuntu.com]

Ign http://ppa.launchpad.net precise/main Sources/DiffIndex



8% [Connecting to security.ubuntu.com] [Connecting to extras.ubuntu.com]

Ign http://security.ubuntu.com precise-security Release



6% [Connecting to extras.ubuntu.com]

Ign http://extras.ubuntu.com precise Release


7% [Connecting to ppa.launchpad.net]

Ign http://security.ubuntu.com precise-security/main Sources/DiffIndex



9% [Connecting to extras.ubuntu.com] [Connecting to ppa.launchpad.net]

Ign http://ppa.launchpad.net precise/main i386 Packages/DiffIndex



10% [Connecting to extras.ubuntu.com] [Connecting to ppa.launchpad.net]

Ign http://ppa.launchpad.net precise/main TranslationIndex



11% [Connecting to security.ubuntu.com] [Connecting to extras.ubuntu.com] [Conn

Ign http://security.ubuntu.com precise-security/restricted Sources/DiffIndex


12% [Connecting to security.ubuntu.com] [Connecting to extras.ubuntu.com] [Conn

Ign http://security.ubuntu.com precise-security/universe Sources/DiffIndex


13% [Connecting to security.ubuntu.com] [Connecting to extras.ubuntu.com] [Conn

Ign http://security.ubuntu.com precise-security/multiverse Sources/DiffIndex


14% [Connecting to security.ubuntu.com] [Connecting to extras.ubuntu.com] [Conn

Ign http://extras.ubuntu.com precise/main Sources/DiffIndex



15% [Connecting to security.ubuntu.com] [Connecting to ppa.launchpad.net]

Ign http://security.ubuntu.com precise-security/main i386 Packages/DiffIndex



16% [Connecting to security.ubuntu.com] [Connecting to extras.ubuntu.com] [Conn

Ign http://extras.ubuntu.com precise/main i386 Packages/DiffIndex


17% [Connecting to security.ubuntu.com] [Connecting to extras.ubuntu.com] [Conn

Ign http://security.ubuntu.com precise-security/restricted i386 Packages/DiffIndex


18% [Connecting to security.ubuntu.com] [Connecting to extras.ubuntu.com] [Conn

Ign http://extras.ubuntu.com precise/main TranslationIndex


18% [Connecting to security.ubuntu.com] [Connecting to extras.ubuntu.com] [Conn

Ign http://security.ubuntu.com precise-security/universe i386 Packages/DiffIndex


19% [Connecting to security.ubuntu.com] [Connecting to extras.ubuntu.com] [Conn

Ign http://security.ubuntu.com precise-security/multiverse i386 Packages/DiffIndex


20% [Connecting to security.ubuntu.com] [Connecting to extras.ubuntu.com] [Conn

Ign http://security.ubuntu.com precise-security/main TranslationIndex


20% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com] [

Ign http://security.ubuntu.com precise-security/multiverse TranslationIndex


20% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com] [

Ign http://security.ubuntu.com precise-security/restricted TranslationIndex


20% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com] [

Ign http://security.ubuntu.com precise-security/universe TranslationIndex


21% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com] [

Err http://in.archive.ubuntu.com precise Release.gpg

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


20% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com] [

Err http://in.archive.ubuntu.com precise-updates Release.gpg

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


20% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com] [

Err http://in.archive.ubuntu.com precise-backports Release.gpg

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


19% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com] [

Ign http://in.archive.ubuntu.com precise Release


17% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com] [

Ign http://in.archive.ubuntu.com precise-updates Release


15% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com] [

Err http://ppa.launchpad.net precise/main Sources

  Something wicked happened resolving 'ppa.launchpad.net:http' (-5 - No address associated with hostname)


15% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com] [

Ign http://in.archive.ubuntu.com precise-backports Release


13% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com] [

Err http://extras.ubuntu.com precise/main Sources

  Something wicked happened resolving 'extras.ubuntu.com:http' (-5 - No address associated with hostname)



Err http://ppa.launchpad.net precise/main i386 Packages

  Something wicked happened resolving 'ppa.launchpad.net:http' (-5 - No address associated with hostname)



Err http://ppa.launchpad.net precise/main Translation-en_IN

  Something wicked happened resolving 'ppa.launchpad.net:http' (-5 - No address associated with hostname)



Err http://ppa.launchpad.net precise/main Translation-en

  Something wicked happened resolving 'ppa.launchpad.net:http' (-5 - No address associated with hostname)


13% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com] [

Ign http://in.archive.ubuntu.com precise/main Sources/DiffIndex



Ign http://in.archive.ubuntu.com precise/restricted Sources/DiffIndex



Err http://extras.ubuntu.com precise/main i386 Packages

  Something wicked happened resolving 'extras.ubuntu.com:http' (-5 - No address associated with hostname)



14% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise/universe Sources/DiffIndex


Err http://extras.ubuntu.com precise/main Translation-en_IN

  Something wicked happened resolving 'extras.ubuntu.com:http' (-5 - No address associated with hostname)


Err http://extras.ubuntu.com precise/main Translation-en

  Something wicked happened resolving 'extras.ubuntu.com:http' (-5 - No address associated with hostname)


15% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise/multiverse Sources/DiffIndex


15% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise/main i386 Packages/DiffIndex


15% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise/restricted i386 Packages/DiffIndex


16% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise/universe i386 Packages/DiffIndex


16% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise/multiverse i386 Packages/DiffIndex


16% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise/main TranslationIndex


16% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise/multiverse TranslationIndex


17% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise/restricted TranslationIndex


17% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise/universe TranslationIndex


17% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-updates/main Sources/DiffIndex


17% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-updates/restricted Sources/DiffIndex


18% [Connecting to in.archive.ubuntu.com] [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-updates/universe Sources/DiffIndex



18% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-updates/multiverse Sources/DiffIndex


18% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-updates/main i386 Packages/DiffIndex


18% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-updates/restricted i386 Packages/DiffIndex


19% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-updates/universe i386 Packages/DiffIndex


19% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-updates/multiverse i386 Packages/DiffIndex


19% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-updates/main TranslationIndex


19% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-updates/multiverse TranslationIndex


19% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-updates/restricted TranslationIndex


20% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-updates/universe TranslationIndex


20% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-backports/main Sources/DiffIndex


20% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-backports/restricted Sources/DiffIndex


20% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-backports/universe Sources/DiffIndex


20% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-backports/multiverse Sources/DiffIndex


21% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-backports/main i386 Packages/DiffIndex


21% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-backports/restricted i386 Packages/DiffIndex


21% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-backports/universe i386 Packages/DiffIndex


21% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-backports/multiverse i386 Packages/DiffIndex


22% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-backports/main TranslationIndex


22% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-backports/multiverse TranslationIndex


22% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-backports/restricted TranslationIndex


22% [Connecting to security.ubuntu.com]

Ign http://in.archive.ubuntu.com precise-backports/universe TranslationIndex


22% [Connecting to security.ubuntu.com]

Err http://security.ubuntu.com precise-security/main Sources

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)



22% [Connecting to in.archive.ubuntu.com]

Err http://security.ubuntu.com precise-security/restricted Sources

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Connecting to in.archive.ubuntu.com]

Err http://security.ubuntu.com precise-security/universe Sources

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Connecting to in.archive.ubuntu.com]

Err http://security.ubuntu.com precise-security/multiverse Sources

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Connecting to in.archive.ubuntu.com]

Err http://security.ubuntu.com precise-security/main i386 Packages

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Connecting to in.archive.ubuntu.com]

Err http://security.ubuntu.com precise-security/restricted i386 Packages

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Connecting to in.archive.ubuntu.com]

Err http://security.ubuntu.com precise-security/universe i386 Packages

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Connecting to in.archive.ubuntu.com]

Err http://security.ubuntu.com precise-security/multiverse i386 Packages

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Connecting to in.archive.ubuntu.com]

Err http://security.ubuntu.com precise-security/main Translation-en_IN

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Connecting to in.archive.ubuntu.com]

Err http://security.ubuntu.com precise-security/main Translation-en

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Connecting to in.archive.ubuntu.com]

Err http://security.ubuntu.com precise-security/multiverse Translation-en_IN

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Connecting to in.archive.ubuntu.com]

Err http://security.ubuntu.com precise-security/multiverse Translation-en

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Connecting to in.archive.ubuntu.com]

Err http://security.ubuntu.com precise-security/restricted Translation-en_IN

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Connecting to in.archive.ubuntu.com]

Err http://security.ubuntu.com precise-security/restricted Translation-en

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Connecting to in.archive.ubuntu.com]

Err http://security.ubuntu.com precise-security/universe Translation-en_IN

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Connecting to in.archive.ubuntu.com]

Err http://security.ubuntu.com precise-security/universe Translation-en

  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Connecting to in.archive.ubuntu.com]

Err http://in.archive.ubuntu.com precise/main Sources

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)



22% [Working]

Err http://in.archive.ubuntu.com precise/restricted Sources

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Working]

Err http://in.archive.ubuntu.com precise/multiverse Sources

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Working]

Err http://in.archive.ubuntu.com precise/main i386 Packages

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Working]

Err http://in.archive.ubuntu.com precise/restricted i386 Packages

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Working]

Err http://in.archive.ubuntu.com precise/universe i386 Packages

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Working]

Err http://in.archive.ubuntu.com precise/multiverse i386 Packages

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Working]

Err http://in.archive.ubuntu.com precise/main Translation-en_IN

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Working]

Err http://in.archive.ubuntu.com precise/main Translation-en

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Working]

Err http://in.archive.ubuntu.com precise/multiverse Translation-en

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Working]

Err http://in.archive.ubuntu.com precise/restricted Translation-en_IN

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Working]

Err http://in.archive.ubuntu.com precise/restricted Translation-en

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Working]

Err http://in.archive.ubuntu.com precise-backports/universe Sources

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

22% [Working]

Err http://in.archive.ubuntu.com precise-backports/multiverse Translation-en_IN

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


22% [Working]

Err http://in.archive.ubuntu.com precise-backports/multiverse Translation-en

  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/precise/main/i18n/Translation-en_IN  Something wicked happened resolving 'ppa.launchpad.net:http' (-5 - No address associated with hostname)



W: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/precise/main/i18n/Translation-en  Something wicked happened resolving 'ppa.launchpad.net:http' (-5 - No address associated with hostname)


W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/restricted/source/Sources  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise/main/source/Sources  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise/restricted/source/Sources  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise/universe/source/Sources  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise/main/binary-i386/Packages  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise/main/i18n/Translation-en_IN  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise/main/i18n/Translation-en  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise/multiverse/i18n/Translation-en_IN  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/binary-i386/Packages  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-updates/universe/binary-i386/Packages  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/binary-i386/Packages  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/i18n/Translation-en  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-updates/universe/i18n/Translation-en_IN  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-updates/universe/i18n/Translation-en  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/main/source/Sources  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/restricted/source/Sources  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/universe/source/Sources  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/source/Sources  Something wicked happened resolving 'in.archive.ubuntu.com:http' (-5 - No address associated with hostname)


E: Some index files failed to download. They have been ignored, or old ones used instead.

如何解决这个问题?

答案1

尝试从 NetwrokManager 内部编辑 DNS 服务器。

首先在终端运行

sudo rm /var/lib/apt/lists/* -vf 

然后打开 NetworkManager 并编辑当前连接,更改 DNS 设置。转到 ipv4 设置,选择仅限自动 (DHCP) 地址按照方法并手动输入您想要的 DNS 服务器。这里我们使用 Google OpenDNS 服务器 8.8.8.8 和 8.8.8.4 ,您可以添加多个地址并用逗号分隔。

在此处输入图片描述

然后运行

sudo service network-manager restart 
sudo apt-get update 

相关内容