无法在 Debian 10 上执行 apt-get update

无法在 Debian 10 上执行 apt-get update

我从 Debian Linux 10 开始,几天前我只安装了一个带有 Apache 的 Web 服务器。

今天想要更新软件包,我使用apt-get update但是出现以下错误,重新启动也无法解决。

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.

我还遇到了与目录相关的错误tmp,我通过更改权限来绕过chmod 777 /tmp && apt-get update --allow-unauthenticated“未签名”错误,但这并没有解决更新失败的问题。我还关注了apt-get update 不起作用:签名/验证错误但那里的任何建议都无法解决问题。

我怎样才能解决这个问题?

答案1

首先,重新启动,然后重试。

如果重启后不成功,请更改 /tmp 的权限以chmod 777 /tmp && apt-get update --allow-unauthenticated绕过“未签名”错误。

相关内容