Ubuntu的软件源更新常见问题及解决

服务器技术, 转自点点 7 年前 回复

, ,

问题一:

执行命令

sudo apt-get update

错误描述如下:

无法下载 bzip2:/var/lib/apt/lists/partial/cn.archive.ubuntu.com_ubuntu_dists。。。

E: Some index files failed to download. They have been ignored, or old ones used instead.

解决方法:

将/var/lib/apt/lists/partial/下的所有文件删除,但是这可以解决大部分问题,个别源不能解决,如"/var/lib/apt/lists/partial/extras.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages",无耐进入/var/lib/apt/lists/将对应的文件删除

问题二:

无法找到对应的KEY
W: GPG error: http://mirrors.sohu.com precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: http://mirrors.sohu.com precise-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: http://mirrors.sohu.com precise-proposed Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: http://archive.canonical.com precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: http://security.ubuntu.com precise-security Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5

解决方法:

使用如下命令:
gpg --keyserver subkeys.pgp.net --recv-keys 40976EAF437D05B5
gpg -a --export 40976EAF437D05B5 | sudo apt-key add -

Via:http://www.cnblogs.com/arrongao/archive/2012/12/15/Hash_Sum_mismatch_key.html

支付宝打赏微信打赏

如果此文对你有帮助,欢迎打赏作者。

发表评论

欢迎回来 (打开)

(必填)

4938