无法更新 ubuntu 20.04

无法更新 ubuntu 20.04

有一段时间了,我无法sudo apt update在安装的 ubuntu 20.04 上成功运行。

例如输出如下

Ign:1 http://ppa.launchpad.net/bluetooth/bluez/ubuntu focal InRelease
Hit:2 http://packages.microsoft.com/repos/code stable InRelease                                    
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease                                             
Get:4 https://cli.github.com/packages stable InRelease [3917 B]                                    
Hit:5 https://download.docker.com/linux/ubuntu focal InRelease                                     
Hit:6 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease                               
Get:7 http://archive.canonical.com/ubuntu focal InRelease [12.1 kB]                                
Hit:8 http://archive.ubuntu.com/ubuntu focal-updates InRelease                                     
Get:9 http://download.opensuse.org/repositories/home:/ungoogled_chromium/Ubuntu_Focal  InRelease [1553 B]
Hit:10 http://archive.ubuntu.com/ubuntu focal-security InRelease                                   
Hit:11 https://download.vscodium.com/debs vscodium InRelease                                       
Hit:12 https://packages.microsoft.com/repos/ms-teams stable InRelease                              
Hit:13 http://archive.ubuntu.com/ubuntu focal-backports InRelease                         
Ign:14 http://ppa.launchpad.net/doctormo/wacom-plus/ubuntu focal InRelease
Err:4 https://cli.github.com/packages stable InRelease                     
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 23F3D4EA75716059
Ign:15 https://github.com/retorquere/zotero-deb/releases/download/apt-get ./ InRelease
Ign:16 http://ppa.launchpad.net/fossfreedom/byzanz/ubuntu focal InRelease  
Err:17 https://github.com/retorquere/zotero-deb/releases/download/apt-get ./ Release
  404  Not Found [IP: 140.82.112.3 443]
Hit:18 http://ppa.launchpad.net/gezakovacs/ppa/ubuntu focal InRelease      
Ign:19 http://ppa.launchpad.net/gloobus-dev/gloobus-preview/ubuntu focal InRelease
Get:20 http://archive.canonical.com/ubuntu focal/partner Sources [716 B]
Get:21 http://archive.canonical.com/ubuntu focal/partner amd64 Packages [856 B]                   
Get:22 http://archive.canonical.com/ubuntu focal/partner Translation-en [384 B]
Hit:23 http://ppa.launchpad.net/jeremysanders/ppa/ubuntu focal InRelease
Hit:24 http://ppa.launchpad.net/kdenlive/kdenlive-stable/ubuntu focal InRelease
Err:9 http://download.opensuse.org/repositories/home:/ungoogled_chromium/Ubuntu_Focal  InRelease
  The following signatures were invalid: EXPKEYSIG 02456C79B2FD48BF home:ungoogled_chromium OBS Project <home:[email protected]>
Ign:25 http://ppa.launchpad.net/lekensteyn/wacom-tablet/ubuntu focal InRelease
Hit:26 http://ppa.launchpad.net/linuxuprising/apps/ubuntu focal InRelease
Hit:27 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu focal InRelease
Err:28 http://ppa.launchpad.net/bluetooth/bluez/ubuntu focal Release
  404  Not Found [IP: 185.125.190.52 80]
Err:29 http://ppa.launchpad.net/doctormo/wacom-plus/ubuntu focal Release
  404  Not Found [IP: 185.125.190.52 80]
Err:30 http://ppa.launchpad.net/fossfreedom/byzanz/ubuntu focal Release
  404  Not Found [IP: 185.125.190.52 80]
Err:31 http://ppa.launchpad.net/gloobus-dev/gloobus-preview/ubuntu focal Release
  404  Not Found [IP: 185.125.190.52 80]
Err:32 http://ppa.launchpad.net/lekensteyn/wacom-tablet/ubuntu focal Release
  404  Not Found [IP: 185.125.190.52 80]
Reading package lists... Done                        
W: GPG error: https://cli.github.com/packages stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 23F3D4EA75716059
E: The repository 'https://cli.github.com/packages stable 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.
E: The repository 'https://github.com/retorquere/zotero-deb/releases/download/apt-get ./ 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: GPG error: http://download.opensuse.org/repositories/home:/ungoogled_chromium/Ubuntu_Focal  InRelease: The following signatures were invalid: EXPKEYSIG 02456C79B2FD48BF home:ungoogled_chromium OBS Project <home:[email protected]>
E: The repository 'http://download.opensuse.org/repositories/home:/ungoogled_chromium/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.
E: The repository 'http://ppa.launchpad.net/bluetooth/bluez/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/doctormo/wacom-plus/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/fossfreedom/byzanz/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/gloobus-dev/gloobus-preview/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/lekensteyn/wacom-tablet/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.
(base) ➜  ~ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
(base) ➜  ~ sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
(base) ➜  ~ sudo sed -i -e 's/archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
(base) ➜  ~ sudo apt-get update
Get:1 https://cli.github.com/packages stable InRelease [3917 B]
Hit:2 https://download.docker.com/linux/ubuntu focal InRelease                                     
Ign:3 http://ppa.launchpad.net/bluetooth/bluez/ubuntu focal InRelease                              
Err:1 https://cli.github.com/packages stable InRelease                                             
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 23F3D4EA75716059
Hit:4 http://archive.canonical.com/ubuntu focal InRelease                                          
Hit:5 http://packages.microsoft.com/repos/code stable InRelease                                    
Ign:6 http://old-releases.ubuntu.com/ubuntu focal InRelease                                        
Hit:7 https://download.vscodium.com/debs vscodium InRelease                                        
Hit:8 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease                               
Ign:9 http://old-releases.ubuntu.com/ubuntu focal-updates InRelease                                
Hit:10 https://packages.microsoft.com/repos/ms-teams stable InRelease                              
Ign:11 http://old-releases.ubuntu.com/ubuntu focal-security InRelease                              
Ign:12 http://ppa.launchpad.net/doctormo/wacom-plus/ubuntu focal InRelease                         
Ign:13 https://github.com/retorquere/zotero-deb/releases/download/apt-get ./ InRelease             
Ign:14 http://old-releases.ubuntu.com/ubuntu focal-backports InRelease                             
Err:15 http://old-releases.ubuntu.com/ubuntu focal Release                                         
  404  Not Found [IP: 185.125.190.40 80]
Get:16 http://download.opensuse.org/repositories/home:/ungoogled_chromium/Ubuntu_Focal  InRelease [1553 B]
Err:17 https://github.com/retorquere/zotero-deb/releases/download/apt-get ./ Release               
  404  Not Found [IP: 140.82.114.4 443]
Err:18 http://old-releases.ubuntu.com/ubuntu focal-updates Release  
  404  Not Found [IP: 185.125.190.40 80]
Ign:19 http://ppa.launchpad.net/fossfreedom/byzanz/ubuntu focal InRelease
Err:20 http://old-releases.ubuntu.com/ubuntu focal-security Release        
  404  Not Found [IP: 185.125.190.40 80]
Err:21 http://old-releases.ubuntu.com/ubuntu focal-backports Release       
  404  Not Found [IP: 185.125.190.40 80]
Hit:22 http://ppa.launchpad.net/gezakovacs/ppa/ubuntu focal InRelease
Ign:23 http://ppa.launchpad.net/gloobus-dev/gloobus-preview/ubuntu focal InRelease
Hit:24 http://ppa.launchpad.net/jeremysanders/ppa/ubuntu focal InRelease
Hit:25 http://ppa.launchpad.net/kdenlive/kdenlive-stable/ubuntu focal InRelease
Err:16 http://download.opensuse.org/repositories/home:/ungoogled_chromium/Ubuntu_Focal  InRelease
  The following signatures were invalid: EXPKEYSIG 02456C79B2FD48BF home:ungoogled_chromium OBS Project <home:[email protected]>
Ign:26 http://ppa.launchpad.net/lekensteyn/wacom-tablet/ubuntu focal InRelease
Hit:27 http://ppa.launchpad.net/linuxuprising/apps/ubuntu focal InRelease
Hit:28 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu focal InRelease
Err:29 http://ppa.launchpad.net/bluetooth/bluez/ubuntu focal Release
  404  Not Found [IP: 185.125.190.52 80]
Err:30 http://ppa.launchpad.net/doctormo/wacom-plus/ubuntu focal Release
  404  Not Found [IP: 185.125.190.52 80]
Err:31 http://ppa.launchpad.net/fossfreedom/byzanz/ubuntu focal Release
  404  Not Found [IP: 185.125.190.52 80]
Err:32 http://ppa.launchpad.net/gloobus-dev/gloobus-preview/ubuntu focal Release
  404  Not Found [IP: 185.125.190.52 80]
Err:33 http://ppa.launchpad.net/lekensteyn/wacom-tablet/ubuntu focal Release
  404  Not Found [IP: 185.125.190.52 80]
Reading package lists... Done                        
W: GPG error: https://cli.github.com/packages stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 23F3D4EA75716059
E: The repository 'https://cli.github.com/packages stable 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.
E: The repository 'http://old-releases.ubuntu.com/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 'https://github.com/retorquere/zotero-deb/releases/download/apt-get ./ 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://old-releases.ubuntu.com/ubuntu focal-updates 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://old-releases.ubuntu.com/ubuntu focal-security 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://old-releases.ubuntu.com/ubuntu focal-backports 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: GPG error: http://download.opensuse.org/repositories/home:/ungoogled_chromium/Ubuntu_Focal  InRelease: The following signatures were invalid: EXPKEYSIG 02456C79B2FD48BF home:ungoogled_chromium OBS Project <home:[email protected]>
E: The repository 'http://download.opensuse.org/repositories/home:/ungoogled_chromium/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.
E: The repository 'http://ppa.launchpad.net/bluetooth/bluez/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/doctormo/wacom-plus/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/fossfreedom/byzanz/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/gloobus-dev/gloobus-preview/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/lekensteyn/wacom-tablet/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.

并且,使用 GUI 应用程序“软件和更新”,我收到一条巨大的错误消息,如下所示 错误信息

当我尝试关闭应用程序并保存我的设置时,无论我选择什么存储库或服务器。

我尝试将 /etc/apt/sources.list 更改为默认值,并运行建议的标准命令,例如 sudo apt update && sudo apt autoremove && sudo apt --fix-broken install && sudo apt upgrade

问题似乎更深层次...有人有什么想法吗?谢谢。

答案1

简单地删除 /etc/apt/sources.list 并不足以解决这个问题,因为 /etc/apt/sources.list.d 目录中还存储了非官方 PPA 的附加文件

我从 /etc/apt/sources.list.d 中删除了 .list 和 .list.save 文件,直到 sudo apt-get update 成功。

相关内容