Ubuntu – Can’t update/upgrade du to “Could not execute ‘apt-key’ to verify signature”

16.04aptgnupgupdatesupgrade

I installed Ubuntu 16.04 last week on my server on a Digital Ocean droplet and since then I can't update nor upgrade anything on my server.
Ma version 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

I get this error after a sudo apt-get update :

Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease [23.9 kB]
Ign:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease                                                                          
Hit:2 http://security.ubuntu.com/ubuntu xenial-security InRelease                                                                    
Get:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease [247 kB]                                       
Err:2 http://security.ubuntu.com/ubuntu xenial-security InRelease
  Could not execute 'apt-key' to verify signature (is gnupg installed?)
Err:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease     
  Could not execute 'apt-key' to verify signature (is gnupg installed?)
Hit:7 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease
Err:7 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease
  Could not execute 'apt-key' to verify signature (is gnupg installed?)
Hit:8 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease
Err:8 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease
  Could not execute 'apt-key' to verify signature (is gnupg installed?)
Fetched 272 kB in 0s (363 kB/s)
Reading package lists... Done
W: GPG error: http://ppa.launchpad.net/ondrej/php/ubuntu xenial         InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: The repository 'http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
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://security.ubuntu.com/ubuntu xenial-security InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: GPG error: https://apt.dockerproject.org/repo ubuntu-xenial Release: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: The repository 'https://apt.dockerproject.org/repo ubuntu-xenial Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
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://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://us.archive.ubuntu.com/ubuntu xenial-backports 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://us.archive.ubuntu.com/ubuntu/dists/xenial-backports/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.

I checked for apt-key which is there and working.

Best Answer

I had the same problem on my Ubuntu droplet at Digital Ocean (after a distro upgrade).

Just upgrade your kernel in the digital ocean administration site (yes, it's weird). There is a "kernel" option in the menu on the left side where you can select a new kernel image.

In my case the upgrade was from 3.x to 4.x series