问题
在新安装的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