把ubuntu的源换了163的后,执行aptitudeupdate.出错:
1. W: Failed to fetch bzip2:/var/lib/apt/lists/partial/mirrors.sohu.com_ubuntu_dists_precise-updates_main_binary-i386_Packages Hash Sum mismatch
解决方法是:
将/var/lib/apt/lists/partial/下的所有文件删除,但是这可以解决大部分问题,个别源不能解决,如"/var/lib/apt/lists/partial/extras.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages",只有进入/var/lib/apt/lists/将对应的文件删除
如还有问题,试试在
/etc/apt/apt.conf.d/05aptitude
最后加一行
Acquire::CompressionTypes::Order"gz";
2.
W
:
GPG
error:http://mirrors.sohu.compreciseRelease:Thefollowingsignaturescouldn'tbeverifiedbecausethepublickeyis
not
available:
NO_PUBKEY
40976EAF437D05B5
解决方法:
使用如下命令:
gpg--keyserversubkeys.pgp.net--recv-keys 40976EAF437D05B5
|
gpg-a--export
40976EAF437D05B5
|sudoapt-keyadd-
(http://www.cnblogs.com/arrongao/archive/2012/12/15/Hash_Sum_mismatch_key.html)
转载于:https://blog.51cto.com/983836259/1300811