在 Ubuntu(使用 163 鏡像源)安裝軟體時,可能遇到 file size mismatch,執行 sudo apt-get update 後又出現 GPG 簽章驗證失敗的訊息:
W: A error occurred during the signature verification ... BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key
即使執行 sudo apt-get clean 再 update,仍會出現相同錯誤。
問題通常出在本機快取的索引檔損壞,重建即可:
sudo apt-get cleancd /var/lib/aptsudo mv lists lists.oldsudo mkdir -p lists/partialsudo apt-get cleansudo apt-get update
將舊的 lists 目錄移走並重建後,再執行 update 便能正常取得並驗證套件索引。