DPKG 错误,安装包时发生冲突

DPKG 错误,安装包时发生冲突

继续尝试安装东西,但控制台会吐出(当我尝试修复它时使用 apt --fix-broken install):

apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libglvnd-core-dev
The following packages will be upgraded:
  libglvnd-core-dev
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
Need to get 0 B/153 kB of archives.
After this operation, 2,226 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 253708 files and directories currently installed.)
Preparing to unpack .../libglvnd-core-dev_1.2.0-1~e~padoka0_amd64.deb ...
Unpacking libglvnd-core-dev:amd64 (1.2.0-1~e~padoka0) over (1.1.1-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libglvnd-core-dev_1.2.0-1
~e~padoka0_amd64.deb (--unpack):
 trying to overwrite '/usr/include/EGL/egl.h', which is also in package libegl1-
mesa-dev:amd64 19.2.1-1ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libglvnd-core-dev_1.2.0-1~e~padoka0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试安装每个包时都会发生这种情况,而当我尝试删除包时,它告诉我由于依赖关系损坏而无法删除。

apt remove libglvnd-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:
 libegl1-mesa-dev : Depends: libglvnd-dev but it is not going to be installed
 libgl1-mesa-dev : Depends: libglvnd-dev but it is not going to be installed
 libgles2-mesa-dev : Depends: libglvnd-dev but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

如果我不能删除它,我就无法解决问题。我断断续续使用 Linux CMD 已有 3 年左右了,对这种复杂情况还是第一次遇到。

答案1

这对我有用:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/libglvnd-core-dev_1.2.0-1~b~padoka0_amd64.deb

答案2

值得注意的是,该 PPA 中的 mesa 包已经大约一周半的时间无法构建,这可能是您遇到问题的根源。

https://launchpad.net/~paulo-miguel-dias/+archive/ubuntu/mesa

相关内容