1. 程式人生 > >[ubuntu]E: The package jenkins needs to be reinstalled, but I can't find an archive for ...

[ubuntu]E: The package jenkins needs to be reinstalled, but I can't find an archive for ...

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 修復一下。