终端执行以下更新命令报错:
apt-get update
出现404 Not Found和W: 无法下载问题,如下:
Err:13 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal Release 404 Not Found [IP: 91.189.95.83 80] Hit:5 https://dl.ubnt.com/unifi/debian stable InRelease Err:15 http://ppa.launchpad.net/jonathonf/python-3.7/ubuntu focal Release 404 Not Found [IP: 91.189.95.83 80] Err:16 http://ppa.launchpad.net/videolan/stable-daily/ubuntu eoan Release 404 Not Found [IP: 91.189.95.83 80] Reading package lists... Done E: The repository 'http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ppa.launchpad.net/jonathonf/python-3.7/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ppa.launchpad.net/videolan/stable-daily/ubuntu eoan Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/php.list:1 and /etc/apt/sources.list.d/php5.list:1 W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/php.list:1 and /etc/apt/sources.list.d/php5.list:1 W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/php.list:1 and /etc/apt/sources.list.d/php5.list:1 W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/php.list:1 and /etc/apt/sources.list.d/php5.list:1 W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/php.list:1 and /etc/apt/sources.list.d/php5.list:1 W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/php.list:1 and /etc/apt/sources.list.d/php5.list:1 W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/php.list:1 and /etc/apt/sources.list.d/php5.list:1 W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/php.list:1 and /etc/apt/sources.list.d/php5.list:1
解决方法:将对应的ppa删除即可
第一步:切换到对应的ppa目录:
cd /etc/apt/sources.list.d
第二步:在该目录下ls,即可以看到很多*.list文件,删除该.list即可(安全起见,可以进行添加后缀.bak的备份)
根据上面的报错,移除命令如下:
mv videolan-ubuntu-stable-daily-eoan.list videolan-ubuntu-stable-daily-eoan.list.bak mv videolan-ubuntu-stable-daily-eoan.list.save videolan-ubuntu-stable-daily-eoan.list.save.bak mv jonathonf-ubuntu-python-3_7-focal.list jonathonf-ubuntu-python-3_7-focal.list.bak mv jonathonf-ubuntu-python-3_7-focal.list.save jonathonf-ubuntu-python-3_7-focal.list.save.bak mv deadsnakes-ubuntu-ppa-focal.list deadsnakes-ubuntu-ppa-focal.list.bak mv deadsnakes-ubuntu-ppa-focal.list.save deadsnakes-ubuntu-ppa-focal.list.save.bak mv php5.list php5.list.bak mv php5.list.save php5.list.save.bak
第三步:检查问题是否解决
在终端中输入命令:
apt-get update
问题解决