Fli
04-06-2013, 10:42 PM
Installed VPS server and got error messages when tried to update it or download some software?
Solution on most linux system is this:
add to the command line:
vim /etc/resolv.conf
now hit key "a"
now paste this into resolv.conf file
search google.com
nameserver 8.8.8.8
nameserver 8.8.4.4
do Ctrl + C
do :w
do :q
now repeat your update process like apt-get update, yum update, you service install etc.
Sample error message you might get when you have not set nameservers for external internet conenction:
root@server:~# apt-get updateErr http://us.archive.ubuntu.com lucid Release.gpg
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ lucid/main Translation-en_US
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ lucid/universe Translation-en_US
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ lucid/multiverse Translation-en_US
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com lucid-security Release.gpg
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ lucid-security/main Translation-en_US
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ lucid-security/universe Translation-en_US
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ lucid-security/multiverse Translation-en_US
Temporary failure resolving 'us.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/Release.gpg Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/main/i18n/Translation-en_US.lzma Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/universe/i18n/Translation-en_US.lzma Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/multiverse/i18n/Translation-en_US.lzma Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid-security/Release.gpg Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid-security/main/i18n/Translation-en_US.lzma Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid-security/universe/i18n/Translation-en_US.lzma Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid-security/multiverse/i18n/Translation-en_US.lzma Temporary failure resolving 'us.archive.ubuntu.com'
W: Some index files failed to download, they have been ignored, or old ones used instead.
Solution on most linux system is this:
add to the command line:
vim /etc/resolv.conf
now hit key "a"
now paste this into resolv.conf file
search google.com
nameserver 8.8.8.8
nameserver 8.8.4.4
do Ctrl + C
do :w
do :q
now repeat your update process like apt-get update, yum update, you service install etc.
Sample error message you might get when you have not set nameservers for external internet conenction:
root@server:~# apt-get updateErr http://us.archive.ubuntu.com lucid Release.gpg
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ lucid/main Translation-en_US
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ lucid/universe Translation-en_US
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ lucid/multiverse Translation-en_US
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com lucid-security Release.gpg
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ lucid-security/main Translation-en_US
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ lucid-security/universe Translation-en_US
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ lucid-security/multiverse Translation-en_US
Temporary failure resolving 'us.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/Release.gpg Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/main/i18n/Translation-en_US.lzma Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/universe/i18n/Translation-en_US.lzma Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/multiverse/i18n/Translation-en_US.lzma Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid-security/Release.gpg Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid-security/main/i18n/Translation-en_US.lzma Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid-security/universe/i18n/Translation-en_US.lzma Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid-security/multiverse/i18n/Translation-en_US.lzma Temporary failure resolving 'us.archive.ubuntu.com'
W: Some index files failed to download, they have been ignored, or old ones used instead.