如何在ubuntu中删除损坏的包

Modified on: Thu, 14 Jun 2018 04:24:53 +0800

我无法删除损坏的包裹。使用以下命令:
sudo apt-get -f install
但我收到以下回复:

Preparing to unpack .../nodejs_0.10.28-1chl1~trusty1_amd64.deb ...
Unpacking nodejs (0.10.28-1chl1~trusty1) over (0.10.25~dfsg2-2ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/nodejs_0.10.28-1chl1~trusty1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/man/man1/node.1.gz', which is also in package nodejs-legacy 0.10.25~dfsg2-2ubuntu1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db (2.6.7.1-1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/nodejs_0.10.28-1chl1~trusty1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试了各种命令,比如

 2015  sudo apt-get clean
 2020  sudo dpkg --configure -a
 2023  sudo apt-get autoremove
 2034  sudo apt-get upgrade && sudo apt-get -f install

但我没有得到任何结果。我无法安装突触。任何想法如何删除破损的包裹?

作者:Krasimir

最佳答案

这解决了我的问题:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/nodejs_0.10.28-1chl1~trusty1_amd64.deb

相关问答

添加新评论