![无法安装 Code::Blocks 插件 wxsmith](https://linux22.com/image/869621/%E6%97%A0%E6%B3%95%E5%AE%89%E8%A3%85%20Code%3A%3ABlocks%20%E6%8F%92%E4%BB%B6%20wxsmith.png)
我正在尝试为 codeblocks 安装 wxsmith 插件。我的电脑中正在运行 Code::Blocks 13.12。我做了以下操作:
sudo apt-get install codeblocks-contrib codeblocks-wxcontrib-dev
它下载了插件但无法安装并出现以下错误消息。
dpkg: error processing archive /var/cache/apt/archives/codeblocks-contrib_13.12-3_amd64.deb (--unpack):
trying to overwrite '/usr/lib/pkgconfig/cb_wximagepanel.pc', which is also in package codeblocks-wxcontrib-dev 13.12-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/codeblocks-contrib_13.12-3_amd64.deb
答案1
您需要安装相同版本的codeblocks-contrib
和codeblocks-wxcontrib-dev
。这将彻底解决您的问题,因为看起来软件包维护者决定在两个版本之间将文件从一个软件包移动到另一个软件包,从而造成了您当前面临的冲突。
您似乎已使用 APT 安装了这些软件包,但无法正确解析软件包的删除和安装顺序(可能是由于软件包冲突条目不正确)。因此,您需要手动下载并强制安装这些软件包:
apt-get download codeblocks-contrib codeblocks-wxcontrib-dev
sudo dpkg -i --force-overwrite --force-overwrite-dir codeblocks-contrib_*.deb codeblocks-wxcontrib-dev_*.deb
或者,删除两个包并重新安装它们:
sudo apt-get remove codeblocks-contrib codeblocks-wxcontrib-dev
sudo apt-get install codeblocks-contrib codeblocks-wxcontrib-dev