Sudo Failed

'Forum Post ulist at
Thu Jan 5 17:14:48 UTC 2006

Old Rocker Wrote: 
> When I try to do an update on my apt-get repositories, this is what I 

> get:


> $ sudo apt-get update

> sudo: unable to lookup ubuntu via gethostbyname()


> and when I click on Synaptic this is the error message that pops up:


> Su returned with an error


> Rebooting doesn't fix it, nor using other applications and seeing if
> its 

> fixed, for instance the same message pops up when I use aptitude and 

> not apt-get.


> Something's happened along the way to change things (permissions or 

> corruption) but I don't know exactly what.


> Anyone know how to deal with this, and is reinstallation the only way?


> -- 


> Old Rocker


> -- 

> ubuntu-users mailing list

> ubuntu-users (AT) lists (DOT)


make sure your hostname is in /etc/hosts.  Here is what my /etc/hosts
looks like (my hostname, found in /etc/hostname, is "caramulo"):

--------------------	localhost.localdomain	localhost	caramulo


  # 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


That first line in your /etc/hosts should contain your hostname.  If
you can't get superuser access, boot with a live cd.


More information about the ubuntu-users mailing list