无发布文件错误

无发布文件错误

我有一台运行 ubuntu 22.04 的虚拟机,但是当我尝试执行 sudo 更新时,出现了以下错误列表:

$ sudo apt update -y
Hit:1 https://download.docker.com/linux/ubuntu jammy InRelease
Ign:2 http://security.ubuntu.com/ubuntu hirsute-security InRelease                                                                                               
Err:3 http://security.ubuntu.com/ubuntu hirsute-security Release                                                                                                 
  404  Not Found [IP: 91.189.91.39 80]
Hit:5 https://dl.google.com/linux/chrome/deb stable InRelease                                                                                                    
Ign:6 http://us.archive.ubuntu.com/ubuntu hirsute InRelease                                                                         
Ign:7 http://us.archive.ubuntu.com/ubuntu hirsute-updates InRelease                                                               
Err:8 http://us.archive.ubuntu.com/ubuntu hirsute Release                                                                         
  404  Not Found [IP: 91.189.91.39 80]
Err:9 http://us.archive.ubuntu.com/ubuntu hirsute-updates Release                                                                 
  404  Not Found [IP: 91.189.91.39 80]
Get:10 https://dl.teradici.com/sLc2Y8yo0wbo3LGu/pcoip-agent/deb/ubuntu bionic InRelease [5240 B]                                  
Hit:4 https://packages.cloud.google.com/apt kubernetes-xenial InRelease                                                                       
Hit:11 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu hirsute-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://us.archive.ubuntu.com/ubuntu hirsute 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://us.archive.ubuntu.com/ubuntu hirsute-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.
W: https://packagecloud.io/slacktechnologies/slack/debian/dists/jessie/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

更新

/etc/apt/sources.list文件:

deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse

deb http://archive.canonical.com/ubuntu/ jammy partner
# deb-src http://archive.canonical.com/ubuntu/ jammy partner

运行后sudo apt-get update -y,这是终端输出:

Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]                                                                                                         
Get:3 http://archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]                                                                                                        
Get:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]                                                                                                      
Hit:6 https://dl.google.com/linux/chrome/deb stable InRelease                                                                                                                   
Err:1 http://archive.ubuntu.com/ubuntu jammy InRelease                                                                                                                          
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
Hit:7 https://download.docker.com/linux/ubuntu jammy InRelease                                                                                                                  
Err:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease                                                                                                                  
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
Get:8 http://archive.canonical.com/ubuntu jammy InRelease [11.4 kB]                                                                                         
Err:3 http://archive.ubuntu.com/ubuntu jammy-security InRelease                                                                                     
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
Err:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease    
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
Get:10 https://dl.teradici.com/sLc2Y8yo0wbo3LGu/pcoip-agent/deb/ubuntu bionic InRelease [5240 B]             
Hit:4 https://packages.cloud.google.com/apt kubernetes-xenial InRelease                                      
Err:8 http://archive.canonical.com/ubuntu jammy InRelease                              
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
Hit:9 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu jammy-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
W: GPG error: http://archive.ubuntu.com/ubuntu jammy-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
E: The repository 'http://archive.ubuntu.com/ubuntu jammy-security 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.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu jammy-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
W: GPG error: http://archive.canonical.com/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
E: The repository 'http://archive.canonical.com/ubuntu jammy 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.
W: https://packagecloud.io/slacktechnologies/slack/debian/dists/jessie/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

更新 2

我删除了 中的所有内容/etc/apt/sources.list。现在,这些是我的更新输出:

$ sudo apt update
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
 sudo apt-get upgrade -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Try Ubuntu Pro beta with a free personal subscription on up to 5 machines.
Learn more at https://ubuntu.com/pro
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt-get dist-upgrade -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Try Ubuntu Pro beta with a free personal subscription on up to 5 machines.
Learn more at https://ubuntu.com/pro
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ 

答案1

您的源无效。您的源列表包含hirsute和 的源xenial。您还有 Debian 的源。这些源都不适用于 Ubuntu 22.04 ( jammy),应将其删除。切勿添加其他发行版的源,否则可能会破坏您的系统。仅添加您的发行版的源,即 Ubuntu 22.04 ( jammy)。

删除有问题的源后,请运行以下命令以使您的系统保持更新:

sudo apt update
sudo apt upgrade

相关内容