常出现到问题:
1、问题如下
W: Failed to fetch http://mirrors.sohu.com/ubuntu/dists/precise/universe/i18n/Index No Hash entry in Release file /var/lib/apt/lists/partial/mirrors.sohu.com_ubuntu_dists_precise_universe_i18n_Index W: Failed to fetch bzip2:/var/lib/apt/lists/partial/mirrors.sohu.com_ubuntu_dists_precise-updates_main_binary-i386_Packages Hash Sum mismatch W: Failed to fetch bzip2:/var/lib/apt/lists/partial/extras.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages Hash Sum mismatch 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/将对应的文件删除
2、无法找到key的问题:
W: GPG 错误:http://ubuntu.uestc.edu.cn precise-updates Release:下列签名无效: BADSIG40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>
解决方法:
使用如下命令:
gpg --keyserver subkeys.pgp.net --recv-keys
40976EAF437D05B5
gpg -a --export 40976EAF437D05B5 | sudo apt-key add - 有时还会出现下面到问题: gpg: 下载密钥‘437D05B5’,从 hkp 服务器 subkeys.pgp.net gpg --delete-key --armor 40976EAF437D05B5 |
删除后重新下载密钥:
gpg --keyserver-options http-proxy --keyserver keyserver.ubuntu.com --recv 40976EAF437D05B5
gpg --export --armor 40976EAF437D05B5 | sudo apt-key add -
保险期间:更新apt缓存:
sudo apt-get clean
cd /var/lib/apt
sudo rm -rf lists.old
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update
3、问题如下:
W: Failed to fetch
bzip2:/var/lib/apt/lists/partial/ppa.launchpad.net_gladky-anton_lammps_ubuntu_dists_quantal_main_binary-i386_Packages
Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead
解决方法如下:
这是ppa的软件到源到问题,与系统到软件源无关,ppa是ubuntu官方专用到第三方源服务器,ppa里的软件的源都是默认把配置文件放/etc/apt/sources.d/文件夹下面的,解决此问题到方法就是删除/etc/apt/sources.d/的所有文件。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。