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

IndoVirtue: $3/month/1GB RAM/20GB SSD space/1TB bandwidth/OpenVZ/Las Vegas

IndoVirtue, founded in late 2010, offers Singapor...

123Systems is acquired by ChicagoVPS, offering 40% discount

123Systems was acquired by ChicagoVPS, and is off...

AlphaVPS: €8/year/128MB RAM/5GB SSD space/100GB bandwidth/KVM/Los Angeles/UK

AlphaVPS, an American hosting provider, was estab...

Neq3Host: $8.5/year/512MB memory/15GB space/1TB traffic/KVM/New York

Neq3Host, founded in January 2016, provides a var...

HostUS: $35/year/512MB RAM/10GB SSD/750GB/OpenVZ/Hong Kong

HostUS, Hong Kong data center prices have increas...

RackNerd Ryzen 9 3900X 1GB RAM 1Gbps Bandwidth Los Angeles MC KVM VPS Review

Details : RackNerd: $30.88/year/Ryzen 9 3900X/1GB...

SeedVPS: €9/month/1GB RAM/250GB storage/1TB bandwidth/KVM/Netherlands

SeedVPS, a Dutch hosting provider, was founded in...

AlphaRacks: $15/year/1GB/15GB space/1.5TB traffic/1 IP/OpenVZ/Los Angeles

AlphaRacks, which I have introduced several times...

ZStack: Free Cloud Computing IaaS

1. ZStack Introduction : ZStack is the next gener...