Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
How can I fix a 404 Error using a PPA?

When I run sudo apt-get update && sudo apt-get dist-upgrade, I get the following:

W: Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release i386 (20111012)/dists/oneiric/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

W: Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release i386 (20111012)/dists/oneiric/restricted/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

W: Failed to fetch http://ppa.launchpad.net/openjdk/ppa/ubuntu/dists/oneiric/main/source/Sources  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/openjdk/ppa/ubuntu/dists/oneiric/main/binary-i386/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
share|improve this question

marked as duplicate by Jorge Castro, Bruno Pereira Feb 23 '12 at 0:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
For what I have checked, the Oneric PPA version of OpenJDK is not in the url it mentions there. So it is telling you that that url address does not exist. For the CD it might be because you do not have the CD in the CDROM. I actually remove the repo for the CD since I do not need it after installing Ubuntu. So in both cases the message says it all. You need to remove both repo links from your Software sources and then try again. –  Luis Alvarado Feb 23 '12 at 0:10
add comment

1 Answer 1

You need to fix your sources.list file. Try opening the terminal Ctrl+Alt+T. Next type sudo gedit sources.list . The sources list will pop-up. Remove the ones listed which appear to no longer be valid. You'll also need to edit the entries in /etc/apt/sources.list.d . To edit these you can type sudo nautilus to open the file browser as root and delete the ppa's listed in the errors above. Replace with actual valid sources and save. Run the update command to refresh and get the updates.

share|improve this answer
    
N: Ignoring file 'openjdk-ppa-oneiric.listb' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension W: Failed to fetch cdrom://Ubuntu 11.10 Oneiric Ocelot - Release i386 (20111012)/dists/oneiric/main/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. W: Failed to fetch cdrom://Ubuntu 11.10 Oneiric Ocelot - Release i386 (20111012)/dists/oneiric/restricted/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. E: Some index files failed to download. They have been ignored, or old ones used instead. –  Francisco Tavares Feb 23 '12 at 11:45
    
Jeremy,There are 4 files in –  Francisco Tavares Feb 23 '12 at 11:46
    
Jeremy,there are 4 files in /etc/apt/sources.list.d. I tried with another extension of the file of the ppa's to overcome the situation. Errors above. 2 of the fimes seem to be backups of the other 2. They are equal and have the extension save. Tell me if it is enough to remove the 2 files having ppa's in the name. I must say I first upgraded from 11.04 to 11.10. After that I reinstalled 11.10 from a DVD clearing the disk. Itś the actual situation. Is there enough to remove ppa's files from /etc/apt/sources.list.d? –  Francisco Tavares Feb 23 '12 at 12:05
    
It's a start. You'll can upgrade to the latest development version by pressing Alt+F2 and then type update-manager -c -d in the run dialog box. –  Jeremy Jared Feb 25 '12 at 1:33
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.