Tag Archives: Failed to fetch Error

How to Solve Ubuntu “Failed to fetch” Error

Operating system: Ubuntu 12.04 LTS

 

In the Ubuntu operating system, it is very convenient to use the apt get command to install the required development software. However, there are many times when the software source can not be linked and can not be installed normally. Therefore, many people will think of using the sudo apt get update command to update the software source. At this time, the update command can not work normally even in the rainy night, resulting in a large number of “failed to” “Fetch” error.

 

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)

 

In fact, it is very simple to solve this problem, as long as it is properly set up

DNS

Server is enough

 

$ sudo vim /etc/resolv.conf 

Modify DNS:

nameserver 8.8.8.8

nameserver 8.8.4.4

Then restart the network service: sudo etc/init.d/networking restart

Execute the sudo apt get update command again, and everything is normal.

 

After I changed it, I found that it still couldn’t work. Later, I click the link to go to the directory above the link. I found that there was no requested resource in the directory, not the network problem.