Docker|--E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation

发布时间 2023-08-27 22:37:41作者: zh89233

错误

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C
E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation

解决方案


 apt-get update && apt-get install -y gnupg2
#或者
apt-get update && apt-get install -y gnupg

验证 --

>apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C

#输出--------Begin--------
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.OWu4RQ3MWv/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C
gpg: key 871920D1991BC93C: public key "Ubuntu Archive Automatic Signing Key (2018) <ftpmaster@ubuntu.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
#输出--------End--------

> apt-get update
#执行成功

备选方案( 我没有试过 )


wget https://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2022.1_all.deb --no-check-certificate
sudo apt install ./kali-archive-keyring_2022.1_all.deb

摘抄文档