2

I'm starting with Debian Linux 10 and I installed only a web server with Apache a few days ago.

Today wanting to update packages, I use apt-get update but I get the following errors, which rebooting did not solve.

Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
Get:2 http://security.debian.org buster/updates InRelease [65.4 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Err:1 http://deb.debian.org/debian buster InRelease
  Couldn't execute /usr/bin/apt-key to check /var/lib/apt/lists/partial/deb.debian.org_debian_dists_buster_InRelease
Err:2 http://security.debian.org buster/updates InRelease
  Couldn't execute /usr/bin/apt-key to check /var/lib/apt/lists/partial/security.debian.org_dists_buster_updates_InRelease
Err:3 http://deb.debian.org/debian buster-updates InRelease
  Couldn't execute /usr/bin/apt-key to check /var/lib/apt/lists/partial/deb.debian.org_debian_dists_buster-updates_InRelease
Get:4 https://deb.nodesource.com/node_13.x buster InRelease [4,584 B]
Err:4 https://deb.nodesource.com/node_13.x buster InRelease
  Couldn't execute /usr/bin/apt-key to check /var/lib/apt/lists/partial/deb.nodesource.com_node%5f13.x_dists_buster_InRelease
Reading package lists... Done
W: GPG error: http://deb.debian.org/debian buster InRelease: Couldn't execute /usr/bin/apt-key to check /var/lib/apt/lists/partial/deb.debian.org_debian_dists_buster_InRelease
E: The repository 'http://deb.debian.org/debian buster InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://security.debian.org buster/updates InRelease: Couldn't execute /usr/bin/apt-key to check /var/lib/apt/lists/partial/security.debian.org_dists_buster_updates_InRelease
E: The repository 'http://security.debian.org buster/updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://deb.debian.org/debian buster-updates InRelease: Couldn't execute /usr/bin/apt-key to check /var/lib/apt/lists/partial/deb.debian.org_debian_dists_buster-updates_InRelease
E: The repository 'http://deb.debian.org/debian buster-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: https://deb.nodesource.com/node_13.x buster InRelease: Couldn't execute /usr/bin/apt-key to check /var/lib/apt/lists/partial/deb.nodesource.com_node%5f13.x_dists_buster_InRelease
E: The repository 'https://deb.nodesource.com/node_13.x buster InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I also got an error concerning the directory tmp that I solved by changing permissions with chmod 777 /tmp && apt-get update --allow-unauthenticated to bypass the "not signed" error, but that did not solve the update failure. I also followed apt-get update not working: Signing/ Verification errors but none of the suggestions there solved the problem.

How can i fix this?

K7AAY
  • 9,725

2 Answers2

0

First, reboot, then try again.

If unsuccessful after the reboot, change the permission of /tmp with chmod 777 /tmp && apt-get update --allow-unauthenticated to bypass the "not signed" error.

K7AAY
  • 9,725
0

The problem seems to be related to /usr/bin/apt-key

Does that executable still exist, and is it executable.

ls -l /usr/bin/apt-key

If it still exists then you can fix it with chmod:

chmod 755 /usr/bin/apt-key

Otherwise the easiest solution is to re-install the OS.


Also the permissions you've changed /tmp are incorrect, and will break security of your system.

You need to do: chmod 1777 /tmp - as shown in https://unix.stackexchange.com/a/71625/536