【问题标题】:W: GPG error: Unknown error executing apt-keyW:GPG 错误:执行 apt-key 时出现未知错误
【发布时间】:2022-11-04 10:36:53
【问题描述】:

运行“sudo apt-get update”时,出现以下错误:

Err:1 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64  InRelease                                                                                     
  Unknown error executing apt-key
Err:2 http://in.archive.ubuntu.com/ubuntu bionic InRelease                                                                                                                 
  Unknown error executing apt-key
Err:5 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                                                       
  Unknown error executing apt-key
Err:6 http://packages.microsoft.com/repos/code stable InRelease                                                                                                            
  Unknown error executing apt-key
Err:4 https://download.docker.com/linux/ubuntu bionic InRelease                                                                                                            
  Unknown error executing apt-key
and more ...

运行“sudo apt install gpg”时,出现以下错误:

/usr/bin/apt-key: 659: /usr/bin/apt-key: grep: not found
Warning: The postinst maintainerscript of the package cumulus-archive-keyring
Warning: seems to use apt-key (provided by apt) without depending on gnupg or gnupg2.
Warning: This will BREAK in the future and should be fixed by the package maintainer(s).
Note: Check first if apt-key functionality is needed at all - it probably isn't!
/usr/bin/apt-key: 695: /usr/bin/apt-key: touch: not found
dpkg: error processing package cumulus-archive-keyring (--configure):
 installed cumulus-archive-keyring package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 cumulus-archive-keyring
sh: 1: touch: not found
E: Sub-process /usr/bin/dpkg returned an error code (1)

此外,我在运行时出现类似错误,“sudo apt install grep --reinstall”。

“sudo apt install cumulus-archive-keyring”给出了以下错误:

After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up cumulus-archive-keyring (4-cl3u5) ...
/usr/bin/apt-key: 659: /usr/bin/apt-key: grep: not found
Warning: The postinst maintainerscript of the package cumulus-archive-keyring
Warning: seems to use apt-key (provided by apt) without depending on gnupg or gnupg2.
Warning: This will BREAK in the future and should be fixed by the package maintainer(s).
Note: Check first if apt-key functionality is needed at all - it probably isn't!
/usr/bin/apt-key: 695: /usr/bin/apt-key: touch: not found
dpkg: error processing package cumulus-archive-keyring (--configure):
 installed cumulus-archive-keyring package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 cumulus-archive-keyring
sh: 1: touch: not found
E: Sub-process /usr/bin/dpkg returned an error code (1)

我也尝试通过以下方式更新所有 gpg 密钥: gpg --refresh-keys 和 apt-key。但没有任何效果。

我也无法安装 y-ppa-manager manager。

我卡住了,请帮帮我!谢谢你。

【问题讨论】:

    标签: gnupg apt-key


    【解决方案1】:

    经过一番检查,我发现/usr/bin/touch 存在但/bin/touch 不存在。使用sudo apt-get install --reinstall coreutils 安装后者解决了我的问题。

    【讨论】:

    • 我也面临同样的错误。 “sudo apt-get install --reinstall coreutils”对我没有帮助。
    猜你喜欢
    • 1970-01-01
    • 2020-07-30
    • 1970-01-01
    • 2014-09-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-02
    • 1970-01-01
    相关资源
    最近更新 更多