Sudo Failed

J.Markoll j.markoll at
Thu Jan 5 17:24:14 UTC 2006

Old Rocker a écrit :
> 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?
I never had to deal with this message error, but I heard about it.
Did you happen to do any research on the web ? I just put 'unable to 
lookup ubuntu via gethostbyname' and it appears that many links are 
available under this search motor.
Did you look if your machine is well declared in /etc/hosts file ?
You should have a line such as this one localhost.localdomain localhost <machine_name>

(but not <Machine_name> either and small letters in /etc/hostname too)

Just incase, is there a /var/lib/apt/lists/lock file ? if yes, remove 
it. It can happen to have one when Synaptic is openened and trying to 
'apt-get' in the console at same time. Save that your message error is 
probably due to another cause.

Try not to reinstall as long as you don't know where a problem comes 
from or you might get the same problem coming back very soon, thus use 
lots of time installing and configuring all again and again.

After I read three thread, I remember now, I had the same message error 
when I started on a Debian first time, just before the first Ubuntu came 
out  :)
(And this /etc/hosts diagnostic solved it)
Maybe we should checkout the bugs around the subject on the Louchpad ?
Best greetings, Joyce Markoll.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the ubuntu-users mailing list