apt-get 给出了错误

apt-get 给出了错误

可能重复:
如何使用 PPA 修复 404 错误?

当我运行时sudo apt-get update && sudo apt-get dist-upgrade,我得到以下信息:

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.

答案1

您需要修复 sources.list 文件。尝试打开终端Ctrl+Alt+T。接下来输入sudo gedit sources.list。源列表将弹出。删除列出的那些似乎不再有效的源。您还需要编辑 中的条目/etc/apt/sources.list.d。要编辑这些条目,您可以输入 sudo nautilus 以 root 身份打开文件浏览器并删除上述错误中列出的 ppa。用实际有效的源替换并保存。运行更新命令以刷新并获取更新。

相关内容