2

I have a VM running ubuntu 22.04 but when I try to do a sudo update, this is the error list:

$ 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.

Update

New /etc/apt/sources.list file:

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

After running sudo apt-get update -y, this is the terminal output:

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.

Update 2

I removed everything in /etc/apt/sources.list. Now, these are my update outputs:

$ 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.
$ 
0

1 Answer 1

4

Your sources are not valid. Your sources list includes sources for hirsute and xenial. You also have sources for Debian. None of these sources are appropriate for Ubuntu 22.04 (jammy) and should be removed. Never add sources for another distribution or you risk breaking your system. Only add sources for your distribution, which is Ubuntu 22.04 (jammy).

Once you have removed the offending sources, run the following commands to bring your system up-to-date:

sudo apt update
sudo apt upgrade
8
  • How can I replace these sources with Jammay via SSH?
    – oo92
    Dec 4, 2022 at 1:00
  • See How do I restore the default repositories?. At the very least you need to check all of the .list files under /etc/apt and its subdirectories and comment out or delete any lines that don't match your release.
    – Nmath
    Dec 4, 2022 at 1:13
  • check the post edit..
    – oo92
    Dec 4, 2022 at 1:22
  • You still have sources for debian, xenial, and bionic. I suggest removing everything except the official Ubuntu 22.04 sources. Go ahead and remove all of the ones associated with third party software. You may need to search here for the error about the public key being unavailable.
    – Nmath
    Dec 4, 2022 at 1:31
  • I did try to remove them but clearly I couldn't do it right.
    – oo92
    Dec 4, 2022 at 1:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.