当我使用时sudo apt-get update
肯定会显示这样的警告
w: The repository 'http://ppa.launchpad.net/upubuntu-com/xampp/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/upubuntu-com/xampp/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
为什么我可以修复它?请帮帮我!
答案1
您之前添加的存储库没有软件包...所以我这样做
sudo apt-get autoclean
删除 sources.list 文件并创建新的 sources.list...
sudo rm /etc/apt/sources.list
然后输入
sudo software-properties-gtk
这将打开 software-properties-gtk 并自动创建一个 newsources.list。
然后将服务器更改为美国或您选择的任何其他服务器。您必须从新对话框中启用存储库才能创建新的 sources.list。
勾选所有框然后单击“恢复”,再单击“关闭”。
需要恢复默认存储库
sudo apt-get update && sudo apt-get dist-upgrade -y
(最好在安装之前备份此文件,以便在发生此类情况时进行恢复)
现在安装任何东西!