Sudo Failed

'Forum Post ulist at gs1.ubuntuforums.org
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) ubuntu.com

> http://lists.ubuntu.com/mailman/listinfo/ubuntu-users



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




Code:
--------------------
    

  127.0.0.1	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.


-- 
_jason




More information about the ubuntu-users mailing list