Ubuntu
如何使用 dget 解決“無公鑰”錯誤?
我正在嘗試使用下載一些軟體包二進製文件,
dget
但我不斷收到“無公鑰”錯誤。dget http://deb.debian.org/debian/pool/main/g/gl-image-display/gl-image-display_0.10-2.dsc
返回輸出
dget: retrieving http://deb.debian.org/debian/pool/main/g/gl-image-display/gl-image-display_0.10-2.dsc % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2243 100 2243 0 0 9080 0 --:--:-- --:--:-- --:--:-- 9080 dget: using existing gl-image-display_0.10.orig.tar.gz dget: using existing gl-image-display_0.10-2.debian.tar.xz dscverify: gl-image-display_0.10-2.dsc failed signature check: gpg: WARNING: no command supplied. Trying to guess what you mean ... gpg: Signature made Wed 06 Apr 2022 04:57:07 PM MDT gpg: using RSA key B5E2FA190FDF9AFE218889CFACC7C2CF30941188 gpg: Can't check signature: No public key Validation FAILED!!
我嘗試使用配置變數
DGET_VERIFY=no
來禁用檢查下載源包的簽名。(見文件),但我仍然得到同樣的錯誤。如何修復此錯誤或禁用驗證檢查?
手冊頁指示
dget -u
將禁用驗證。之前沒用過dget
,所以不知道這個命令行選項是不是和config變數有一樣的效果,但是值得一試。
從 Debian 的密鑰伺服器下載公鑰,以便您可以對其進行驗證:
$ gpg --keyserver keyring.debian.org \ > --recv-keys B5E2FA190FDF9AFE218889CFACC7C2CF30941188 gpg: key ED63B6125A1D1561: public key imported gpg: Total number processed: 1 gpg: imported: 1
然後你可以
dget
那個包:$ dget http://deb.debian.org/debian/pool/main/g/gl-image-display/gl-image-display_0.10-2.dsc dget: retrieving http://deb.debian.org/debian/pool/main/g/gl-image-display/gl-image-display_0.10-2.dsc dget: retrieving http://deb.debian.org/debian/pool/main/g/gl-image-display/gl-image-display_0.10.orig.tar.gz dget: retrieving http://deb.debian.org/debian/pool/main/g/gl-image-display/gl-image-display_0.10-2.debian.tar.xz gl-image-display_0.10-2.dsc: Good signature found validating gl-image-display_0.10.orig.tar.gz validating gl-image-display_0.10-2.debian.tar.xz All files validated successfully. dpkg-source: info: extracting gl-image-display in gl-image-display-0.10 dpkg-source: info: unpacking gl-image-display_0.10.orig.tar.gz dpkg-source: info: unpacking gl-image-display_0.10-2.debian.tar.xz