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

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.

39 thoughts on “Update Manager hangs in Ubuntu 8.04 (and how to fix it)

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

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

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

  8. Pingback: Simon Scullion » Update Manager hangs in Ubuntu 8.04 (and how to fix it)

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

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

  11. Just FYI – another workaround is to run update-manager as root.

    But your solution is more elegant, IMHO

  12. If you have an issue with this resolution:

    First, check to see your network setup is correct. In may case, the hostname really needs to be defined correctly in the /etc/hosts file. You don’t have to removed the localhost line, but your assigned IP needs to be correctly defined.

    See this example:
    127.0.0.1 localhost
    10.250.1.25 mycomputer.mydomain

    Now, using a terminal window, I did an su to the root user, then you have the needed permissions to change the file. You cannot edit/save the /etc/hosts file from a standard user account – it is setup to disallow that type of thing for a reason.

    The last step, it may not be necessary, but I exited from the terminal session. Closed all open apps, and rebooted. I did this step because I don’t want to be surprised later. I have a single user setup, so it’s no big deal in my case. However, if you have a multi-user setup or server, schedule that reboot as soon as you can.

    Once, back up I was able to finally get through an update without hanging.

    Thanks for the helpful post.

  13. beautiful!

    new to ubuntu and forgot that to put “g” in front of “edit” lol.

    no more terminal updating for me! aka screw aptitude!

    thanks for this post!!!

  14. I tried the gksudo gedit etc/hosts approach but the hosts file is empty. I tried to revert but the file has been deleted. I’ve hardly used this machine since installing (couldn’t get web access until last night) so I don’t think it can be anything I’ve done. Any ideas?

  15. Thank you for the fix. I too am pretty new to Linux in general. Like Globalcommunication my etc/host file was blank in gedit from terminal. I had to do the frowned upon sudo nautilus and navigate to the file. Then I could see the contents in gedit.

  16. Actually I checked /etc/hosts but it was blank. In Apps->System->Network in the General tab I had some dumb name in the “Host name” field.
    After deleting it, and doing a sudo killall update-manager to knock off the hung software, when I relaunched update manager it worked properly again. Hurray for internetz! Hurray for Joe!

  17. Pingback: Update Manager et al hanging | keyongtech

  18. Great! how on earth did you figure out how to do that? Worked like a charm.

  19. Yeah.. it works for me also… Thank u very much………..!

    Have fun..

  20. Thanks for the post. Being new to Ubuntu, I was stopped a while by the gksudo/sudo stuff in a terminal: it would not work for the same reason “unresolved host”.
    I recommend to use the tool selected through menus system->administration->network.
    Password is gently asked for, and the 127.0.1.1 entry can resolve nicely to the host name you type in.

    Thanks again.

  21. Thank man, (:-)-|-<
    I'd preferred qedit at root console to /etc/hosts file.

    -Pete-

  22. nice.. computer name was wrong there.. So i just changed that and it worked 🙂 without removing the address.. 🙂

    thanx..

  23. Hey am really new at this,but my update manager runs but after a while it says failed to fetch……pliz help

  24. @pitz:
    Is your internet connection working OK from a browser? Otherwise it could be your network setup / DNS settings etc. If your browser is fine, perhaps your Ubuntu is configured for the wrong repositories. Where is it trying to download its updates from?

  25. @joe,this is the message it is conveying

    Could not download all repository indexes
    The repository may no longer be available or could not be contacted because of network problems. If available an older version of the failed index will be used. Otherwise the repository will be ignored. Check your network connection and ensure the repository address in the preferences is correct.

    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid/Release.gpg Could not connect to 10.23.15.238:8080 (10.23.15.238). – connect (110: Connection timed out)
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid/restricted/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid/multiverse/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid/main/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid/universe/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-backports/Release.gpg Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-backports/main/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-backports/restricted/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-backports/universe/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-backports/multiverse/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://archive.canonical.com/ubuntu/dists/lucid/Release.gpg Could not connect to 10.23.15.238:8080 (10.23.15.238). – connect (110: Connection timed out)
    Failed to fetch http://archive.canonical.com/ubuntu/dists/lucid/partner/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-security/Release.gpg Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-security/main/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-security/restricted/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-security/multiverse/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-security/universe/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-updates/Release.gpg Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-updates/restricted/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-updates/main/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-updates/universe/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-updates/multiverse/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-proposed/Release.gpg Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-proposed/restricted/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-proposed/main/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-proposed/universe/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-proposed/multiverse/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://dl.google.com/linux/deb/dists/stable/Release.gpg Could not connect to 10.23.15.238:8080 (10.23.15.238). – connect (110: Connection timed out)
    Failed to fetch http://dl.google.com/linux/deb/dists/stable/main/i18n/Translation-en_US.bz2 Unable to connect to 10.23.15.238:8080:
    Failed to fetch cdrom://Ubuntu-Netbook 10.04 _Lucid Lynx_ – Release i386 (20100429.4)/dists/lucid/main/binary-i386/Packages.gz Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
    Failed to fetch cdrom://Ubuntu-Netbook 10.04 _Lucid Lynx_ – Release i386 (20100429.4)/dists/lucid/restricted/binary-i386/Packages.gz Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
    Failed to fetch http://dl.google.com/linux/deb/dists/stable/main/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://archive.canonical.com/ubuntu/dists/lucid/partner/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://archive.canonical.com/ubuntu/dists/lucid/partner/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid/restricted/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid/multiverse/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid/main/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid/restricted/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid/main/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid/multiverse/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid/universe/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid/universe/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-backports/main/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-backports/restricted/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-backports/universe/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-backports/multiverse/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-backports/main/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-backports/restricted/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-backports/universe/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-backports/multiverse/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-security/main/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-security/restricted/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-security/multiverse/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-security/restricted/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-security/main/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-security/multiverse/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-security/universe/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-security/universe/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-updates/restricted/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-updates/main/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-updates/universe/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-updates/multiverse/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-updates/restricted/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-updates/main/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-updates/universe/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-updates/multiverse/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-proposed/restricted/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-proposed/main/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-proposed/universe/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-proposed/multiverse/binary-i386/Packages.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-proposed/restricted/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-proposed/main/source/Sources.gz Unable to connect to 10.23.15.238:8080:

    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-proposed/universe/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/lucid-proposed/multiverse/source/Sources.gz Unable to connect to 10.23.15.238:8080:
    Some index files failed to download, they have been ignored, or old ones used instead.

  26. why is ubuntu 10.04 giving so much problem…. i have been trying to update it for almost a month and it doesn’t seem to work

  27. Sorry, but this didn’t help a bit. I’m still getting the exact same error.

  28. @ Maijhi I too am having the same problems… the update manager runs for about 2 seconds and then crashes. I haven’t been able to update for about a month or so now… Does anyone know what might be going on?

Leave a Reply

Your email address will not be published. Required fields are marked *