Ubuntu – Failed to download repository information after updating

update-manager

I have a warning sign on the upper bar, a red triangle and an exclamation inside. I click this icon and I am informed that there are updates and the "Show updates" option is available. I click on "Show updates" and I am informed that the package information was last updated 78 days ago. I am prompted to click the check button for new updates. I click the check button and it says "updating cache" and after a moment a "Failed to download repository information" message appears.

This was the result of the execution of"sudo apt-get update | grep NO_PUBKEY:

W: Failed to fetch ppa.launchpad.net/openjdk/ppa/ubuntu/dists/oneiric/main/source/… 404 Not Found W: Failed to fetch ppa.launchpad.net/openjdk/ppa/ubuntu/dists/oneiric/main/… 404 Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.

This situation has been happening often. What should I do?

Best Answer

You are trying to update OpenJDK from a PPA; that should not be needed anymore since now OpenJDK is in the main Ubuntu repositories. The maintainers of that PPA have therefore decided not to provide OpenJDK for Oneiric, that's why you are getting an error when trying to update the package lists.

To fix the error, open the editor of your choice. Super User permissions are needed though.

Open this file /etc/apt/sources.list

Find the lines (if any) that contain something similar to:

deb http://ppa.launchpad.net/openjdk oneiric main

deb-src http://ppa.launchpad.net/openjdk oneiric main

and remove them entirely.

After this is done Save the file and run the following command:

sudo apt-get update

This should fix your problem.

Related Question