W: GPG error: 由於無法取得它們的公鑰,以下簽章無法進行驗證: NO_PUBKEY 4EB27DB2A3B88B8B

小蛙有一台最早期的 VPS 已經不讓人重裝新版本作業系統,小蛙異想天開想直接從系統裡安裝升級,「事情絕對沒有憨蛙想得那麼簡單」,升級升到一半就哭了 …

升到一半狂噴錯,但已回不了頭,之後下 apt update 都會噴以下錯誤

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
W: GPG error: http://dl.google.com/linux/chrome/deb stable InRelease: 由於無法取得它們的公鑰,以下簽章無法進行驗證: NO_PUBKEY 4EB27DB2A3B88B8B
W: The repository 'http://dl.google.com/linux/chrome/deb stable InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://dl.google.com/linux/chrome/deb stable InRelease: 由於無法取得它們的公鑰,以下簽章無法進行驗證: NO_PUBKEY 4EB27DB2A3B88B8B W: The repository 'http://dl.google.com/linux/chrome/deb stable InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://dl.google.com/linux/chrome/deb stable InRelease: 由於無法取得它們的公鑰,以下簽章無法進行驗證: NO_PUBKEY 4EB27DB2A3B88B8B
W: The repository 'http://dl.google.com/linux/chrome/deb stable InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

根據這篇文章 GPG error: Release: The following signatures were invalid: BADSIG 的方法嘗試回復 apt-get

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo apt-get clean
sudo mv /var/lib/apt/lists /tmp
sudo mkdir -p /var/lib/apt/lists/partial
sudo apt-get clean
sudo apt-get update
sudo apt-get clean sudo mv /var/lib/apt/lists /tmp sudo mkdir -p /var/lib/apt/lists/partial sudo apt-get clean sudo apt-get update
sudo apt-get clean
sudo mv /var/lib/apt/lists /tmp
sudo mkdir -p /var/lib/apt/lists/partial
sudo apt-get clean
sudo apt-get update

錯誤訊息變成這個

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://dl.google.com/linux/chrome/deb stable InRelease: 由於無法取得它們的公鑰,以下簽章無法進行驗證: NO_PUBKEY 4EB27DB2A3B88B8B
W: 無法取得 http://dl.google.com/linux/chrome/deb/dists/stable/InRelease,由於無法取得它們的公鑰,以下簽章無法進行驗證: NO_PUBKEY 4EB27DB2A3B88B8B
W: Some index files failed to download. They have been ignored, or old ones used instead.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://dl.google.com/linux/chrome/deb stable InRelease: 由於無法取得它們的公鑰,以下簽章無法進行驗證: NO_PUBKEY 4EB27DB2A3B88B8B W: 無法取得 http://dl.google.com/linux/chrome/deb/dists/stable/InRelease,由於無法取得它們的公鑰,以下簽章無法進行驗證: NO_PUBKEY 4EB27DB2A3B88B8B W: Some index files failed to download. They have been ignored, or old ones used instead.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://dl.google.com/linux/chrome/deb stable InRelease: 由於無法取得它們的公鑰,以下簽章無法進行驗證: NO_PUBKEY 4EB27DB2A3B88B8B
W: 無法取得 http://dl.google.com/linux/chrome/deb/dists/stable/InRelease,由於無法取得它們的公鑰,以下簽章無法進行驗證: NO_PUBKEY 4EB27DB2A3B88B8B
W: Some index files failed to download. They have been ignored, or old ones used instead.

看起來好像是因為公鑰過期,查了該討論串裡的其他方法,發現下面這指令像是可以更新公鑰,死馬當活馬醫的心態試試看居然成功了!

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com
apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com
apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com

可喜可賀~!但 VPS 還是沒辦法升上去 >< (殘念),不過至少讓 apt-get 恢復正常了!

    發佈留言

    發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

    這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料