How to solve the "no public key available..." error when using apt-get on Debian/Ubuntu

How to solve the "no public key available..." error when using apt-get on Debian/Ubuntu

When running apt-get update to refresh the update source in Ubuntu and Debian, the problem of "There is no public key available for the following key IDs" is often encountered, which is manifested as the following error message:

 W:There is no public key available for the following key IDs: 3B4FE6ACC0B21F32, W:There is no public key available for the following key IDs: 3B4FE6ACC0B21F32,

The solution is as follows,

 sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32

Replace 3B4FE6ACC0B21F32 with the IDs you have problems with.

In addition, if you have the following problems, it is because you have added the natty-backports source, just delete it

 W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/natty-backports/main/source/Sources 404 Not Found [IP: 91.189.91.13 80], W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/natty-backports/restricted/source/Sources 404 Not Found [IP: 91.189.91.13 80], W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/natty-backports/universe/source/Sources 404 Not Found [IP: 91.189.91.13 80], W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/natty-backports/multiverse/source/Sources 404 Not Found [IP: 91.189.91.13 80],

Run the following command:

 sudo sed -i '/natty\-backports/d' /etc/apt/sources.list{,.d/*}

via: https://www.vmvps.com/apt-get-error-no-public-key-available-solution.html

<<:  VPS4Storage: £30/year/512MB RAM/75GB storage/2TB bandwidth/Xen/Germany

>>:  FullyHost: $84/year/4GB RAM/400GB storage/4TB bandwidth/OpenVZ/North Carolina

Recommend

SaltyVM 1GB RAM 100Mbps Shaoxing KVM VPS Review

Details: SaltyVM: 36 yuan/month/384MB memory/10GB...

PieLayer: $19.99/year/1024MB/25GB SSD/500GB bandwidth/OpenVZ

PieLayer is an American hosting company that was ...

sf.net/mysql/ssh/sftp stable old free space (transfer)

Sourceforge.net is the world's largest open s...

VPSBiT: $7/month/512MB memory/350GB space/3TB traffic/XEN/Hong Kong

VPSBiT, a European hosting provider, has been int...

VPS, dedicated server one-click shielding Chinese IP (can be other countries)

This code can block domestic IP. Of course, by ch...

Free domain email

1. Abroad 1. Kuikoo Provide free mailbox, corpora...