Joe Wein’s blog

Comments from Yokohama, Japan

Update Manager hangs in Ubuntu 8.04 (and how to fix it)

May 17th, 2008 · 17 Comments

Last month I upgraded my notebook from Ubuntu 7.10 to 8.04 (”Hardy Heron”). Since then, whenever I tried tried to install the up to 133 updates that had become available, the Update Manager would hang indefinitely instead of prompting me for the user password.

If you’re in the same situation, the following tips might help you. Edit /etc/hosts with an editor of your choice (e.g. sudo vi /etc/hosts). There should be two entries with IPv4 addresses starting with 127.0.x.x, like this:

127.0.0.1 localhost
127.0.1.1 mycomputername.mydomain

Remove the domain name from the entry starting with 127.0.1.1, leaving only the computer name and save the file. Now try again.

When I made this change I got the password prompt as expected and all the updates where downloaded and applied.

Tags: Computers · Linux · software

17 responses so far ↓

  • 1 Bangstick // May 28, 2008 at 4:39 am

    Thank you….thank you. You just saved me for an OS install, as I could not find a solution for this.

    Your /etc/hosts edit worked a treat.

  • 2 spoon_1212 // May 28, 2008 at 5:12 am

    Thanks, this worked like a charm. I was having problems trying to get all of the updates to work in terminal. I managed to get about 50 them installed but 6 of them would not install for some reason. Anyway, this fixed the hang up and I’m downloading them now.

  • 3 Daniel Hegarty // May 28, 2008 at 6:31 pm

    Spot on! being a Linux novice I had no idea what this SUDO business was all about. so after two hours of trawling the internet I figured it out. in Terminal you have to type:-

    gksudo gedit etc/hosts

    And then put in the admin password and you will be able to edit the file. Pritty lame of me I know, but just encase anyone else has the same issues.

  • 4 Sven Siegmund // May 28, 2008 at 8:53 pm

    Didn’t work for me:
    sudo vi /etc/hosts returned
    Could not resolve host kazimir.
    I had to boot Knoppix mount the Ubuntu partition, and edit Ubuntu’s /etc/hosts on the the mounted partition. In ubuntu I could not write to the hosts file. chmod 644 hosts did not work as I was not permitted. sudo chmod 644 hosts on ubuntu could not resolve host /-: But with Knoppix or any other live CD I could fix that.

  • 5 Franklin // May 30, 2008 at 9:55 pm

    Thanks Joe,

    Don’t know why but it did the trick.

  • 6 JD // May 31, 2008 at 2:03 am

    Thanks for this tip!
    Not only did this cure the Update Manager problem, it also solved a problem with many of the admin tasks not asking for a password and not running.

  • 7 Lollipop // May 31, 2008 at 2:35 am

    Thank you soooooo much! Works magic :)))

  • 8 musashi // Jun 1, 2008 at 7:43 am

    yep worked for me too. Many thanks!

  • 9 Allard // Jun 4, 2008 at 4:24 pm

    Thanks for the tip.

  • 10 shards // Jun 5, 2008 at 11:07 pm

    Didn’t work
    I used the command u posted;in the Terminal i edited the document.Now how do I save the changes?

  • 11 phlebas // Jun 6, 2008 at 11:25 pm

    @4– is it possible that

    $ sudo vi /etc/hosts

    actually gave the output:

    Could not resolve host kazimir.Password:

    I noticed the same thing (’cept using emacs), but sudo was still running somehow and took my password.

  • 12 Simon Scullion » Update Manager hangs in Ubuntu 8.04 (and how to fix it) // Jun 10, 2008 at 7:26 am

    […] I did, and a quick search on google lead me to this post on Joe Wein’s blog with a clear explanation on how to solve the issue: Last month I upgraded my […]

  • 13 Rt Bitchalot // Jun 10, 2008 at 11:09 am

    Thank you so much for this fix. Worked like a charm on my Dell C600 Latitude laptop.

  • 14 adam d. // Jun 14, 2008 at 1:35 am

    it works, but with the consequence that anything looking for localhost no longer works. one tends to take ‘localhost’ for granted, so that can be any number of scripts and servers that may be lying around.

  • 15 adam d. // Jun 14, 2008 at 1:40 am

    this is the underlying problem

    https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/234879

  • 16 adam d. // Jun 14, 2008 at 1:46 am

    and wouldn’t you know the actual bug fix (of gksu) is only days away.

    https://bugs.launchpad.net/ubuntu/+source/gksu/+bug/91151

  • 17 Jason // Jun 23, 2008 at 4:28 am

    This worked me as well. Thanks!

Leave a Comment