Can't update/upgrade du to "Could not execute 'apt-key' to verify signature"
Solution 1
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
Solution 2
Changing the permission of /tmp
back to their defaults worked for me:
sudo chmod 1777 /tmp
Solution 3
In my case I played with AppArmor and enabled complain mode on sshd
. Disabling it by aa-disable /usr/sbin/sshd
and re-connecting fixed my problem.
Related videos on Youtube
ddattee
I'm a web developer in a french Web Agency called Smile. I've specialized in Zend Framework 1 & 2, Magento 1 & 2. But I'm also very familiar with Angular, Ionic, Symfony. I'm also quite familiar with basic network management in entreprise, virtual infrastructure (vSphere/Esxi environement) and web server management.
Updated on September 18, 2022Comments
-
ddattee over 1 year
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.-
ddattee about 8 yearsFor a part solution I added Digital Ocean repository mirrors with which the system had no problem so I have been able to update my applications and my system. But the problem is still here and the update fail for all official repos
-
wangguoqin1001 about 8 yearsI've got these errors too, and haven't found a way to solve it. Replacing repositories with Digital Ocean ones doesn't work, and my investigation shows that there might be some call errors with apt-get, apt-key and /usr/lib/apt/methods/gpgv, but no further information with strace or bash debugging. Well one more clue: this is the only server of mines on DO which is running on i386 (surprisingly).
-
deivid almost 8 yearsSame problem here... Digital Ocean, 16.04 i386 involved too.
-
-
ddattee almost 8 yearsThanks for the reply unfortunetly I got rid of the server with the problem and bought a new one (the old one was 4 years old :p) so I cannot test this but it seem like a good solution. I'll let anyone who has this problem try the solution and tell me if it fixes the problem.
-
wolfog over 2 yearsthanks ,this works for me