1.安装软件的时候提示已安装的某一个软件没有正常结束,,


apt-get --reinstall install 
sudo apt-get -f install openssh-server
以上是强制安装

One way to look for corruption would be to examine /var/lib/dpkg/info/.list for each of the packages in question, and see if they look damaged somehow (compare them to the files for healthy packages).


2.最近碰到过在ubuntu12.04Desktop版 虚机没有办法update的情况,

如:

W: Failed to fetch bzip2:/var/lib/apt/lists/partial/extras.ubuntu.com_ubuntu_dists_precise_main_binary-amd64_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
W: Failed to fetch bzip2:/var/lib/apt/lists/partial/ppa.launchpad.net_saltstack_salt_ubuntu_dists_precise_main_binary-amd64_Packages  Hash Sum mismatch
W: Failed to fetch bzip2:/var/lib/apt/lists/partial/ppa.launchpad.net_saltstack_salt_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.

老提示MD5 mismatch啊神马的。。。。

解决办法是将可以正常更新的下述文件和目录拷贝过来即可:

/var/lib/apt/*    
/etc/apt/sources.list   
/etc/apt/sources.list.d/*
apt-get --force-yesinstallsalt-master


我存了一份ubuntu12.04 sohu源的上述文件在:

http://yun.baidu.com/share/link?shareid=725237496&uk=1476826022