ubuntu 1404上,apt-get install 会不成功,发生以下现象。
现象:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package jenkins needs to be reinstalled, but I can't find an archive for i
解决办法:
1. 备份 dpkg的状态文件
sudo cp -a /var/lib/dpkg/status /var/lib/dpkg/status.bkp
2. 打开状态文件
sudo vim /var/lib/dpkg/status
3. 在文件中找到错误的 jenkins状态,并删除
4. 为安全起见 再使用 apt-get -f install 修复一下。