系統更新報錯--NO_PUBKEY


錯誤信息

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://kali.mirror.garr.it/mirrors/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
W: Some index files failed to download. They have been ignored, or old ones used instead.

網友說是證書簽名過期,要重新獲取

deb http://http.kali.org/kali kali-rolling main non-free contrib

解決辦法

wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add

添加其他源

deb http://http.kali.org/kali kali-rolling main non-free contrib
#ubuntu
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse

因為有些安裝包在只ubuntu的源里有,添加后方便安裝

執行

sudo apt-get update

報錯:

W: GPG error: http://mirrors.aliyun.com/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
E: The repository 'http://mirrors.aliyun.com/ubuntu xenial InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

原因和上面一樣

解決

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5

提示

gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpg: connecting dirmngr at '/run/user/0/gnupg/d.yxdtz3qfxad3bakdigbecgmf/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr

安裝相關依賴:

apt-get install software-properties-common dirmngr

再次

apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32

OK
執行

sudo apt-get update

OK


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM