1

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?

Jorge Castro
  • 73,717

5 Answers5

1

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.

0

Ctrl+Alt+t open a terminal and run the code here:

sudo apt-get update && sudo apt-get upgrade

If the above fails to update then:

sudo apt-get clean
sudo apt-get autoremove
sudo apt-get update && sudo apt-get upgrade

Please post back any errors if any.

Ringtail
  • 16,285
0

Sounds like you may have some repositories that have no public keys, which are causing the download of certain packages to be aborted.

Run the following command from a terminal. Take note of the alpha-numeric keys returned on the screen:

sudo apt-get update | grep NO_PUBKEY

If there is a value returned run this command replacing the area in quotations with the value returned but without quotes. Do this for each key:

sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com "INPUTKEY HERE"

After this is done run update:

sudo apt-get update
Alexandre
  • 1,968
0

The sources for those PPA's does not exist. Oneiric is not listed.

You need to remove those lines from the software sources.list

First thing is to back up your sources.list

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

Now edit the file. Look for the offending line, it would look like this example:

deb http://ppa.launchpad.net/openjdk/ppa/ubuntu natty main

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

To edit use the following:

gksudo gedit /etc/apt/sources.list

You want to comment out the lines using the "#" and make it look like this:

#deb http://ppa.launchpad.net/openjdk/ppa/ubuntu natty main

#deb-src http://ppa.launchpad.net/openjdk/ppa/ubuntu natty main

Save the file. Then run this code:

sudo apt-get update && sudo apt-get upgrade

you should be good-to-go now

Ringtail
  • 16,285
0

I had this same problem, I back tracked what I was doing because it was working correctly until I did an edit to /etc/network/interface from dhcp to static, I changed it back to dhcp and all repos started working again.