这不是重复的当我使用 PPA 或更新我的软件包列表时,如何修复 404 错误?
当我运行时sudo apt update
出现错误:
Hit:1 https://linux.teamviewer.com/deb stable InRelease
...
Hit:15 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease
Err:16 http://ppa.launchpad.net/morphis/anbox-support/ubuntu focal InRelease
403 Forbidden [IP: 185.125.190.52 80]
Hit:17 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
Reading package lists... Done
E: Failed to fetch http://ppa.launchpad.net/morphis/anbox-support/ubuntu/dists/focal/InRelease 403 Forbidden [IP: 185.125.190.52 80]
E: The repository 'http://ppa.launchpad.net/morphis/anbox-support/ubuntu focal InRelease' is not signed.
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.
我有一个403 Forbidden
。
我找到了这个当我使用 PPA 或更新我的软件包列表时,如何修复 403 禁止错误?我尝试过
sudo add-apt-repository -r ppa:morphis/anbox-support
但是我收到了这个错误:
Cannot add PPA: 'ppa:~morphis/ubuntu/anbox-support'.
The user named '~morphis' has no PPA named 'ubuntu/anbox-support'
Please choose from the following available PPAs:
* 'ffmpeg': FFMpeg backport
* 'intel-media': Intel Media Driver Backport
* 'mesa': Mesa patches
* 'scrcpy': scrcpy
* 'staging': Package staging area
* 'touch-staging': Touch Staging
我怎样才能解决这个问题 ?
答案1
它就在您的输出中:
The user named '~morphis' has no PPA named 'ubuntu/anbox-support'
您收到 403 错误而不是 404 错误仅仅是由于 Launchpad 服务器设置造成的。
您可以使用完全相同的方式修复 403 和 404 问题:删除不存在的 apt 源。
答案2
由于sudo add-apt-repository -r ppa:morphis/anbox-support
没有起作用,我列出了所有来源ls -al /etc/apt/sources.list.d
:
drwxr-xr-x 2 root root 4096 Mar 21 10:57 ./
drwxr-xr-x 8 root root 4096 Mar 21 14:00 ../
-rw-r--r-- 1 root root 112 Mar 21 10:57 docker.list
-rw-r--r-- 1 root root 112 Mar 21 10:57 docker.list.save
-rw-r--r-- 1 root root 189 Mar 21 10:57 google-chrome.list
-rw-r--r-- 1 root root 189 Mar 21 10:57 google-chrome.list.save
-rw-r--r-- 1 root root 142 Mar 21 10:57 graphics-drivers-ubuntu-ppa-focal.list
-rw-r--r-- 1 root root 142 Mar 21 10:57 graphics-drivers-ubuntu-ppa-focal.list.save
-rw-r--r-- 1 root root 144 Mar 21 10:57 morphis-ubuntu-anbox-support-focal.list
-rw-r--r-- 1 root root 144 Mar 21 10:57 morphis-ubuntu-anbox-support-focal.list.save
-rw-r--r-- 1 root root 89 Mar 21 10:57 mssql-release.list
-rw-r--r-- 1 root root 89 Mar 21 10:57 mssql-release.list.save
-rw-r--r-- 1 root root 122 Mar 21 10:57 ondrej-ubuntu-php-focal.list
-rw-r--r-- 1 root root 122 Mar 21 10:57 ondrej-ubuntu-php-focal.list.save
-rw-r--r-- 1 root root 50 Mar 21 10:57 symfony-cli.list
-rw-r--r-- 1 root root 50 Mar 21 10:57 symfony-cli.list.save
-rw-r--r-- 1 root root 1255 Mar 21 10:57 teamviewer.list
-rw-r--r-- 1 root root 1255 Mar 21 10:57 teamviewer.list.save
我手动删除morphis-ubuntu-anbox-support-focal.list
了morphis-ubuntu-anbox-support-focal.list.save
:
sudo rm morphis-ubuntu-anbox-support-focal.list
sudo rm morphis-ubuntu-anbox-support-focal.list.save
现在一切正常