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?

1

5 Answers 5

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.

2
  • Thanks, Scott. But in the file you mention, there are only rows that begin by "deb us.archive... and "deb-src us.archive ... or deb extras ... No row has the word "ppa". Feb 17, 2012 at 12:15
  • do any of those rows contain the word OpenJDK? If they do then delete those rows and then rerun sudo apt-get update Feb 17, 2012 at 16:20
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.

1
  • Thanks Rick. My answer is the same for Alexandre and Scott. Feb 16, 2012 at 23:26
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
7
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

4
  • Thanks, BlueXrider. As I said before, there are no lines beginning by "#deb ppa.launchpad.net/openjdk/ppa/ubuntu natty main or #deb-src ppa.launchpad.net/openjdk/ppa/ubuntu natty main. Nor lines ending by natty main but oneiric Feb 17, 2012 at 12:23
  • But now I think I understand the reason because this happen. There is a lack of synchronisation between the version of the ubuntu installed and the updates that are downloaded. I reinstalled ubuntu from scratch and the updates that come are to the version of ubuntu previously installed. I reinstalled ubuntu another time giving another name to the computer but it didn't work again. I don't how the target of the updates is searched (name of the computer and IP?) but I think there must be any type of synchronization. Feb 17, 2012 at 12:39
  • I gave you AN EXAMPLE. As to how and what to look for WHILE EDITING. It was not meant to TO USE LITERALLY. As I stated before the PPA that you are trying to use DOES NOT EXIST. Therefore is needs to be removed from the sources.list
    – Ringtail
    Feb 17, 2012 at 18:02
  • deb mirrors.nfsi.pt/ubuntu oneiric-updates main restricted deb-src mirrors.nfsi.pt/ubuntu oneiric-updates main restricdeb cdrom:[Ubuntu 11.10 Oneiric Ocelot - Release i386 (20111012)]/ oneiric main restricted deb mirrors.nfsi.pt/ubuntu oneiric main restricted deb-src mirrors.nfsi.pt/ubuntu oneiric main restricted Feb 22, 2012 at 11:52
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .