By mlv
Since upgrading to Ubuntu 16.04.01, every time I try apt-get update, I see:
W: GPG error: http://security.ubuntu.com/ubuntu xenial-security InRelease: Could not execute ‘apt-key’ to verify signature (is gnupg installed?)
With chattr +a /tmp and apt-get -o “Debug::Acquire::gpgv=true” update, I tried rerunning apt-key by hand with the same arguments, and it runs fine.
I created a new droplet with 14.04 and upgraded it to 16.04 and it works fine.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
The real answer in my case was that my kernel was way out of date (although for the life of me I can’t understand why that would make any difference). It was failing in execve (returning EPERM). I hadn’t noticed that even though apt-get would install a new kernel, the droplet would never actually use the new kernel.
Curiously I am getting the error right now for a droplet that is reporting it is on 16.04.2 LTS
Linux 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial
Hit:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB] Err:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease Could not execute ‘apt-key’ to verify signature (is gnupg installed?) Err:2 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease Could not execute ‘apt-key’ to verify signature (is gnupg installed?) Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB] Err:3 http://security.ubuntu.com/ubuntu xenial-security InRelease Could not execute ‘apt-key’ to verify signature (is gnupg installed?) Fetched 204 kB in 0s (404 kB/s) 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://us.archive.ubuntu.com/ubuntu xenial InRelease: Could not execute ‘apt-key’ to verify signature (is gnupg installed?) W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease: Could not execute ‘apt-key’ to verify signature (is gnupg installed?) W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.ubuntu.com/ubuntu xenial-security InRelease: Could not execute ‘apt-key’ to verify signature (is gnupg installed?) W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial/InRelease Could not execute ‘apt-key’ to verify signature (is gnupg installed?) W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Could not execute ‘apt-key’ to verify signature (is gnupg installed?) W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease Could not execute ‘apt-key’ to verify signature (is gnupg installed?) W: Some index files failed to download. They have been ignored, or old ones used instead.
What’s going wrong here?
I encountered this problem today when I tried to update my company’s servers and it prevented me from updating the packages and the kernel as well.
The solution was simply to reboot the server and everything is working now as expected.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.