1. 程式人生 > >debian系linux更新時,提示“由於沒有公鑰,無法驗證下列簽名”

debian系linux更新時,提示“由於沒有公鑰,無法驗證下列簽名”

問題

在新安裝的Ubuntu上,我在使用sudo apt-get update更新時,出現如下錯誤:

W: GPG error: http://mirrors.163.com/debian wheezy-proposed-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553  NO_PUBKEY 7638D0442B90D010
W: The repository 'http://mirrors.163
.com/debian wheezy-proposed-updates 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://mirrors.163.com/debian wheezy Release
: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 NO_PUBKEY 6FB2A1C265FFB764 W: The repository 'http://mirrors.163.com/debian wheezy Release' 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. E: Failed to fetch http://mirrors.163.com/debian/dists/wheezy/main/i18n/Translation-en BZ2_bzread: /var/lib/apt/lists/partial/mirrors.163.com_debian_dists_wheezy_main_i18n_Translation-en.bz2 Read error (-5: DATA_ERROR_MAGIC) E: Some index files failed to download. They have been ignored, or old ones used instead.

解決方法

1. 下載匯入公鑰

# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys  8B48AD6246925553

# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys  7638D0442B90D010

# 此處的8B48AD6246925553、7638D0442B90D010是錯誤提示中的:NO_PUBKEY 8B48AD6246925553  NO_PUBKEY 7638D0442B90D010 

2. 校驗問題

此時繼續使用sudo apt-get update更新,發現沒有公鑰錯誤提示了,但還存在校驗問題。

E: Failed to fetch http://mirrors.163.com/debian/dists/wheezy/main/i18n/Translation-en  BZ2_bzread: /var/lib/apt/lists/partial/mirrors.163.com_debian_dists_wheezy_main_i18n_Translation-en.bz2 Read error (-5: DATA_ERROR_MAGIC)
E: Some index files failed to download. They have been ignored, or old ones used instead.

此時需要開啟軟體源的介面,將其他軟體選項中的Canpnical合作伙伴/獨立等四個選項取消勾選,

執行更新

# sudo apt-get update