-3

This is not a duplicate of How can I fix a 404 Error when using a PPA or updating my package lists?

When I run sudo apt update I got error:

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.

I got a 403 Forbidden.

I found this How can I fix a 403 Forbidden Error when using a PPA or updating my package lists? which I tried

sudo add-apt-repository -r ppa:morphis/anbox-support

But I got this error:

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

How can I fix this ?

Lenny4
  • 135
  • It could be that the PPA could be incompatible with your Ubuntu Release. What is the Ubuntu release? – Rishon_JR Mar 21 '23 at 15:29
  • The user named '~morphis' has no PPA named 'ubuntu/anbox-support' seems clear. What leads you to believe that such a PPA exists? – user535733 Mar 21 '23 at 15:54
  • Anbox is abandoned, that's why there's nothing in the PPA. – popey Mar 21 '23 at 16:05
  • @Rishon_JR my ubuntu release is 20.04 – Lenny4 Mar 21 '23 at 17:45
  • @user535733 when I execute sudo apt update you can see in log that apt try to reach http://ppa.launchpad.net/morphis/anbox-support/ubuntu which is forbidden now. But it used to work. How can I fix that so I can execute sudo apt update without having an error ? – Lenny4 Mar 21 '23 at 17:47
  • @popey I anderstand that but how can I fix that so I can sudo apt update without having an error ? – Lenny4 Mar 21 '23 at 17:48
  • You must delete the apt source that no longer exists. – user535733 Mar 21 '23 at 17:54
  • @user535733 I tried to do it with sudo add-apt-repository -r ppa:morphis/anbox-suppor but I got an error – Lenny4 Mar 21 '23 at 17:56
  • 1
    There's probably a file called morphis-ppa.list or similar in /etc/apt/sources.list.d/ which you can just remove, and then apt update and all will be good again. – popey Mar 21 '23 at 18:05

2 Answers2

1

It's right there in your output:

The user named '~morphis' has no PPA named 'ubuntu/anbox-support'

You are getting a 403 error instead of a 404 error merely due to the Launchpad server settings.

You fix both 403 and 404 problems exactly the same way: By deleting the non-existent apt source.

How to do so is thoroughly explained at How can I fix a 404 Error when using a PPA or updating my package lists?

user535733
  • 62,253
0

As sudo add-apt-repository -r ppa:morphis/anbox-support didn't work I listed all sources with 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

and I manually deleted morphis-ubuntu-anbox-support-focal.list and morphis-ubuntu-anbox-support-focal.list.save:

sudo rm morphis-ubuntu-anbox-support-focal.list
sudo rm morphis-ubuntu-anbox-support-focal.list.save

Now everything works fine

Lenny4
  • 135