Ubuntu 系统在“apt install”过程中出现错误,似乎留下了一堆乱七八糟的东西

Ubuntu 系统在“apt install”过程中出现错误,似乎留下了一堆乱七八糟的东西

编辑:答案是直接使用“dpkg -r”删除 libjpeg9-dev,而不是依赖 apt 命令。删除 libjpeg9-dev,然后运行“apt --fix-broken install”即可解决问题。

在“apt install libtiff-dev”期间,我收到“Ubuntu 内部错误”消息。无论是否巧合,无论是否相关,自从重新启动以来,我遇到了“apt install”问题。我尝试执行“apt install whois”,结果

You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libtiff-dev : Depends: libjpeg-dev

并建议运行“apt --fix-broken install”。执行此操作会安装“libjpeg-turbo8-dev”;接受该建议获胜

trying to overwrite '/usr/include/jerror.h', which is also in package  libjpeg9-dev:amd64 1:9d-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

libjpeg9-dev 确实已安装,但 libtiff-dev 真正抱怨的 libjpeg-dev 未安装。尝试安装它时,系统提示它依赖于 libjpeg8-dev,但提示不会安装它。

尝试自己安装它让我得到:

libjpeg8-dev : Depends: libjpeg-turbo8-dev (>= 1.1.90+svn722-1ubuntu6)
but it is not going to be installed
libjpeg9-dev : Conflicts: libjpeg8-dev but 8c-2ubuntu8 is to be installed

所以我有点困在这儿了。

简而言之,libtiff5 依赖于 libjpeg8,但我安装了 libjpeg9,这会产生冲突。如果您能提供任何关于如何摆脱这个困境的建议,我将不胜感激。

谢谢你的帮助。

在修复 libtiff 安装的过程中,我尝试删除 libjpeg9-dev,其完整输出为 libtiff 具有未满足的依赖关系:

# apt remove libjpeg9-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libtiff-dev : Depends: libjpeg-dev
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
# 
# 
# apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  libfprint-2-tod1
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  libjpeg-turbo8-dev
The following NEW packages will be installed:
  libjpeg-turbo8-dev
0 upgraded, 1 newly installed, 0 to remove and 31 not upgraded.
6 not fully installed or removed.
Need to get 0 B/238 kB of archives.
After this operation, 988 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 249664 files and directories currently installed.)
Preparing to unpack .../libjpeg-turbo8-dev_2.0.3-0ubuntu1.20.04.1_amd64.deb ...
Unpacking libjpeg-turbo8-dev:amd64 (2.0.3-0ubuntu1.20.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libjpeg-turbo8-dev_2.0.3-
0ubuntu1.20.04.1_amd64.deb (--unpack):
 trying to overwrite '/usr/include/jerror.h', which is also in package libjpeg9-
dev:amd64 1:9d-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libjpeg-turbo8-dev_2.0.3-0ubuntu1.20.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
# 

谢谢你看这个。

答案1

我在 上遇到了同样的问题sudo apt install r-base。它依赖于 libjpeg-turbo8-dev,但已安装的 libjpeg9-dev 导致冲突。下面为我修复了这个问题。

sudo dpkg -r libjpeg9-dev
sudo apt --fix-broken install

相关内容