PDA

View Full Version : [ubuntu] unable to resolve host



vchapman
July 27th, 2009, 08:21 PM
My update package (and other stuff) doesn't work when I click on the appropriate icon. With some help from this forum I was able to get an update through a terminal window.

Here is an example of what I believe is symptomatic of the problem:

jean@jean-desktop:~$ sudo apt-get upgrade
sudo: unable to resolve host jean-desktop
[sudo] password for jean:
Reading package lists... Done
Building dependency tree

How do I fix the unable to resolve host jean-desktop problem?

coffeecat
July 27th, 2009, 09:20 PM
It could be that your /etc/hosts file needs fixing. Did you do a version upgrade recently?

Anyway, the first page of this thread might help you:

http://ubuntuforums.org/showthread.php?t=723361

If you're not sure how to edit your hosts file, post the terminal output of:


cat /etc/hosts

vchapman
July 27th, 2009, 09:56 PM
It could be that your /etc/hosts file needs fixing. Did you do a version upgrade recently?

Anyway, the first page of this thread might help you:

http://ubuntuforums.org/showthread.php?t=723361

If you're not sure how to edit your hosts file, post the terminal output of:


cat /etc/hosts

jean@jean-desktop:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 jean-desktop.home

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

I assume I need to take out the ".home"

coffeecat
July 27th, 2009, 10:03 PM
I assume I need to take out the ".home"

I agree. Are you comfortable with editing system files, or do you need any help?

I've never had this problem myself, but there must be a bug somewhere affecting a lot of people because when I started typing 'ubuntu unable to resolve host' in Google, I only got as far as 'ubuntu una' when the google search bar prompted me with the whole phrase and said there were 49900 results. Seems that it usually happens after a dist-upgrade.

vchapman
July 27th, 2009, 10:14 PM
I agree. Are you comfortable with editing system files, or do you need any help?

I've never had this problem myself, but there must be a bug somewhere affecting a lot of people because when I started typing 'ubuntu unable to resolve host' in Google, I only got as far as 'ubuntu una' when the google search bar prompted me with the whole phrase and said there were 49900 results. Seems that it usually happens after a dist-upgrade.


I have edited the file and carried out the fix that I suggested above. This seems to have resolved a number of the issues I was having.

Thank you for your assistance.