无法使用 sudo apt update 进行更新的 repo

无法使用 sudo apt update 进行更新的 repo

我尝试过获取 php 8.0,但很麻烦,所以我想删除它,我也这么做了。现在当我更新时,我得到了这个:

ubuntu@ubuntu:~$ sudo apt update
Hit:1 https://download.docker.com/linux/ubuntu focal InRelease
Ign:2 https://packages.sury.org/php focal InRelease                                                                                                           
Hit:3 http://ports.ubuntu.com/ubuntu-ports focal InRelease                                                                                                    
Err:4 https://packages.sury.org/php focal Release                                  
  404  Not Found [IP: 104.21.18.148 443]
Get:5 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]        
Hit:6 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease                              
Get:7 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [101 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports focal-updates/restricted arm64 Packages [2992 B]
Get:10 http://ports.ubuntu.com/ubuntu-ports focal-updates/restricted Translation-en [57.0 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports focal-updates/multiverse arm64 Packages [7720 B]
Get:12 http://ports.ubuntu.com/ubuntu-ports focal-updates/multiverse Translation-en [6888 B]
Get:13 http://ports.ubuntu.com/ubuntu-ports focal-security/restricted arm64 Packages [2804 B]
Get:14 http://ports.ubuntu.com/ubuntu-ports focal-security/restricted Translation-en [47.8 kB]
Reading package lists... Done            
E: The repository 'https://packages.sury.org/php 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.

我尝试阅读论坛上关于如何删除存储库的信息,但我不知道存储库的名称。我可以顺利安装和清除,但更新是主要问题。

答案1

编辑文件/etc/apt/sources.list,例如,使用 nano 编辑器:

sudo nano /etc/apt/sources.list

然后用“sury”repo 注释这些行,并#在行首添加。

然后返回终端,并重复该sudo apt-get update命令。

相关内容