升级 kubuntu:尝试覆盖软件包时出错

升级 kubuntu:尝试覆盖软件包时出错

我正在尝试将我的 kubuntu 升级到最新版本。

运行 sudo apt-get dist-upgrade 时,我得到:

(Reading database ... 558588 files and directories currently installed.)
Preparing to unpack .../libjpeg-progs_1%3a9b-1_amd64.deb ...
Unpacking libjpeg-progs (1:9b-1) over (8c-2ubuntu8) ...
dpkg: error processing archive /var/cache/apt/archives/libjpeg-progs_1%3a9b-1_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/rdjpgcom', which is also in package libjpeg-turbo-progs 1.3.0-0ubuntu2
Errors were encountered while processing:
 /var/cache/apt/archives/libjpeg-progs_1%3a9b-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

所以现在我想让我们删除这个包:

sudo apt-get remove libjpeg-progs
sudo apt-get purge libjpeg-progs

但两个命令也输出:

(Reading database ... 558588 files and directories currently installed.)
Preparing to unpack .../libjpeg-progs_1%3a9b-1_amd64.deb ...
Unpacking libjpeg-progs (1:9b-1) over (8c-2ubuntu8) ...
dpkg: error processing archive /var/cache/apt/archives/libjpeg-progs_1%3a9b-1_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/rdjpgcom', which is also in package libjpeg-turbo-progs 1.3.0-0ubuntu2
Errors were encountered while processing:
 /var/cache/apt/archives/libjpeg-progs_1%3a9b-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我如何才能升级或删除这个软件包?

答案1

做了一些研究,你可以尝试一下

sudo dpkg -i --force-overwrite /var/cache/apt/archives/libjpeg-progs_1%3a9b-1_amd64.deb

然后运行

sudo apt-get install -f

查看是否有错误

相关内容