
我想將 ubuntu 上可用的 cppcheck 版本從 1.68 升級到 1.70。但是,下載 DEB 存檔後,由於依賴 libpcre3,我無法安裝它。
$ sudo gdebi cppcheck_1.70-2_i386.deb
...
This package is uninstallable
Dependency is not satisfiable: libpcre3 (>= 1:8.35)
安裝 libpcre 3.35.* 會產生下列結果:
$ sudo gdebi libpcre3_8.35-7.2_i386.deb
...
Do you want to install the software package? [Y/N]:Y
Selecting previously unselected package libpcre3:i386.
(Reading database ... 212075 files and directories currently installed.)
Preparing to unpack libpcre3_8.35-7.2_i386.deb ...
De-configuring libpcre3:amd64 (1:8.31-2ubuntu2.1) ...
Unpacking libpcre3:i386 (2:8.35-7.2) ...
dpkg: error processing package libpcre3:i386 (--install):
package libpcre3:i386 2:8.35-7.2 cannot be configured because libpcre3:amd64 is at a different version (1:8.31-2ubuntu2.1)
dpkg: error processing package libpcre3:amd64 (--install):
package libpcre3:amd64 1:8.31-2ubuntu2.1 cannot be configured because libpcre3:i386 is at a different version (2:8.35-7.2)
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
libpcre3:i386
libpcre3:amd64
我仍然安裝了舊版本的 libpcre,因為似乎所有內容都與它相關。如果我刪除它,它會破壞很多東西。
我也嘗試過重新編譯 cppcheck,但它顯然需要最新版本的 libpcre。
那麼問題來了,我有什麼辦法可以在14.04上安裝這個嗎?
答案1
您嘗試在 64 位元系統上安裝 32 位元軟體包,這是可以的,但是要安裝 32 位元軟體包,也必須安裝相同版本的 64 位元軟體包。因此,在以下位置安裝.deb
兩個系統的文件相同的時間:
首先修復您的安裝:
sudo apt-get install -f
在那之後:
sudo dpkg -i libpcre3_8.35-7.2_i386.deb libpcre3_8.35-7.2_amd64.deb