Ubuntu操作系统“Failed to fetch”错误的解决方法
2014-12-22 15:27
337 查看
操作系统:Ubuntu 12.04 LTS
在Ubuntu操作系统中,使用apt-get命令安装所需的开发软件非常方便,但也有不少时候由于链接不上软件源而不能正常安装,于是很多人都会想到使用sudo apt-get
update命令来更新软件源,而恰恰这时屋漏偏逢连夜雨,更新命令也不能正常工作,出现大量“Failed to fetch”的错误。
其实,解决这个问题十分简单,只要设置妥当DNS服务器即可,如电信网络的设置如下所示。
再次执行sudo apt-get update命令,结果一切正常。
在Ubuntu操作系统中,使用apt-get命令安装所需的开发软件非常方便,但也有不少时候由于链接不上软件源而不能正常安装,于是很多人都会想到使用sudo apt-get
update命令来更新软件源,而恰恰这时屋漏偏逢连夜雨,更新命令也不能正常工作,出现大量“Failed to fetch”的错误。
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/main/binary-i386/Packages Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname) W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/binary-i386/Packages Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname) W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/universe/binary-i386/Packages Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname) W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/binary-i386/Packages Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname) W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/main/i18n/Translation-en_US Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname)
其实,解决这个问题十分简单,只要设置妥当DNS服务器即可,如电信网络的设置如下所示。
$ sudo vi /etc/resolv.conf
再次执行sudo apt-get update命令,结果一切正常。
Hit http://archive.ubuntu.com precise-proposed/restricted TranslationIndex Hit http://archive.ubuntu.com precise-proposed/universe TranslationIndex Hit http://archive.ubuntu.com precise/main Translation-en Hit http://archive.ubuntu.com precise/multiverse Translation-en Hit http://archive.ubuntu.com precise/restricted Translation-en Hit http://archive.ubuntu.com precise/universe Translation-en Hit http://archive.ubuntu.com precise-updates/main Translation-en Hit http://archive.ubuntu.com precise-updates/multiverse Translation-en Hit http://archive.ubuntu.com precise-updates/restricted Translation-en Hit http://archive.ubuntu.com precise-updates/universe Translation-en Hit http://archive.ubuntu.com precise-security/main Translation-en Hit http://archive.ubuntu.com precise-security/multiverse Translation-en Hit http://archive.ubuntu.com precise-security/restricted Translation-en Hit http://archive.ubuntu.com precise-security/universe Translation-en Hit http://archive.ubuntu.com precise-backports/main Translation-en Hit http://archive.ubuntu.com precise-backports/multiverse Translation-en Hit http://archive.ubuntu.com precise-backports/restricted Translation-en Hit http://archive.ubuntu.com precise-backports/universe Translation-en Hit http://archive.ubuntu.com precise-proposed/main Translation-en Hit http://archive.ubuntu.com precise-proposed/multiverse Translation-en Hit http://archive.ubuntu.com precise-proposed/restricted Translation-en Hit http://archive.ubuntu.com precise-proposed/universe Translation-en Fetched 107 kB in 6s (16.6 kB/s) Reading package lists... Done
相关文章推荐
- Ubuntu下 安装 Android SDK方法(包含Failed to fetch URL https://dl-ssl.google.com/错误的解决方法)
- Ubuntu “Failed to fetch”错误的解决方法
- ubuntu-如何解决错误-Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release
- Ubuntu下,通过gem安装mysql时,出现Failed to build gem native extension.错误的解决方法
- ubuntu-如何解决错误-Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release
- Android SDK安装Failed to fetch URL https://dl-ssl.google.com/错误解决方法
- ubuntu Failed to fetch 404 错误解决
- Ubuntu无法启动~错误:init:failed to spawn..解决方法
- 在android中使用proguard混淆代码出现“Conversion to Dalvik format failed with error 1”错误的解决方法
- gem install mysql2 在windows错误(Failed to build gem native extension)解决方法
- ubuntu android failed to create the SD card 解决方法
- Weblogic - Failed to bind remote object 错误解决方法
- .net程序中Configuration system failed to initialize错误及解决方法
- 运行Android SDK Manager 遇到“Failed to fetch URL…“的解决方法
- 在Ubuntu下搭建Eclipse+SVN,涉及 Failed to load JavaHL Library的解决方法~
- JBoss中配置数据源出现错误:“Failed to register driver for: com.mysql.jdbc.Driver”的解决方法
- 在android中使用proguard混淆代码出现“Conversion to Dalvik format failed with error 1”错误的解决方法
- 解决Ubuntu启动时出现的 Failed to initialize HAL 错误
- eclipse中出现Context startup failed due to previous errors错误解决方法
- eclipse中出现Context startup failed due to previous errors错误解决方法