套件更新錯誤
public key 遺失問題
大約每兩三天我就會 update 一下我的電腦套件,但今天早上遇到了一點狀況。先說明一下我的作業系統和電腦:
電腦: x230
OS: Ubuntu 17.04 (從 16.10 直接升級到 17.04 )
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 Release:
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6494C6D6997C215E
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release.gpg
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6494C6D6997C215E
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
遇到上述的 apt update 問題,可以經由兩個步驟來檢查:
1. 修改 google-chrome.list
打開 terminal 輸入以下資訊,以 gedit 編輯以下檔案
sudo gedit /etc/apt/sources.list.d/google-chrome.list
檢查檔案中 deb 後方的 arch 有沒有加上 amd64,如果沒有,請手動將它改寫為 [arch=amd64],然後存檔再執行一次 sudo apt-get update
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
2. 重新取得 repo key from Google
打開 terminal 輸入以下資訊
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
上述兩個步驟都執行成功的話,重新 sudo apt-get update 就可以修正了!
沒有留言:
張貼留言