benjamin@benjamin-ThinkPad-X260:~$ sudo apt-get install --reinstall libgl1-mesa-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:
libgl1-mesa-dev : Depends: libgl-dev but it is not going to be installed
libgl1-mesa-dev:i386 : Depends: libgl-dev:i386 but it is not going to be installed
libglvnd-dev : Depends: libegl-dev (>= 1.3.0-1) but it is not going to be installed
Depends: libgl-dev (>= 1.3.0-1) but it is not going to be installed
Depends: libgles-dev (>= 1.3.0-1) but it is not going to be installed
Depends: libglx-dev (>= 1.3.0-1) but it is not going to be installed
libglvnd-dev:i386 : Depends: libegl-dev:i386 (>= 1.3.0-1) but it is not going to be installed
Depends: libgl-dev:i386 (>= 1.3.0-1) but it is not going to be installed
Depends: libgles-dev:i386 (>= 1.3.0-1) but it is not going to be installed
Depends: libglx-dev:i386 (>= 1.3.0-1) but it is not going to be installed
python : PreDepends: python-minimal (= 2.7.15~rc1-1) but 2.7.15-3~oibaf~b is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
benjamin@benjamin-ThinkPad-X260:~$ apt --fix-broken install
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
benjamin@benjamin-ThinkPad-X260:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libdrm-dev libglvnd-core-dev libglvnd-core-dev:i386 libx11-xcb-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev libxcb-present-dev
libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxdamage-dev libxext-dev libxfixes-dev
libxshmfence-dev libxxf86vm-dev mesa-common-dev
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libegl-dev libegl-dev:i386 libgl-dev libgl-dev:i386 libgles-dev libgles-dev:i386 libglx-dev libglx-dev:i386 libpython-stdlib
libpython2-stdlib python python2
Suggested packages:
python-doc python-tk python2-doc
The following NEW packages will be installed:
libegl-dev libegl-dev:i386 libgl-dev libgl-dev:i386 libgles-dev libgles-dev:i386 libglx-dev libglx-dev:i386 libpython2-stdlib python2
The following packages will be upgraded:
libpython-stdlib python
2 upgraded, 10 newly installed, 0 to remove and 25 not upgraded.
66 not fully installed or removed.
Need to get 0 B/478 kB of archives.
After this operation, 4.240 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 255672 files and directories currently installed.)
Preparing to unpack .../0-libglx-dev_1.3.1-1~oibaf~b_amd64.deb ...
Unpacking libglx-dev:amd64 (1.3.1-1~oibaf~b) ...
dpkg: error processing archive /tmp/apt-dpkg-install-QGZVH6/0-libglx-dev_1.3.1-1~oibaf~b_amd64.deb (--unpack):
trying to overwrite '/usr/include/GL/glx.h', which is also in package mesa-common-dev:i386 20.0.8-0ubuntu1~18.04.1
Preparing to unpack .../1-libgl-dev_1.3.1-1~oibaf~b_amd64.deb ...
Unpacking libgl-dev:amd64 (1.3.1-1~oibaf~b) ...
dpkg: error processing archive /tmp/apt-dpkg-install-QGZVH6/1-libgl-dev_1.3.1-1~oibaf~b_amd64.deb (--unpack):
trying to overwrite '/usr/include/GL/gl.h', which is also in package mesa-common-dev:i386 20.0.8-0ubuntu1~18.04.1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../2-libglx-dev_1.3.1-1~oibaf~b_i386.deb ...
Unpacking libglx-dev:i386 (1.3.1-1~oibaf~b) ...
dpkg: error processing archive /tmp/apt-dpkg-install-QGZVH6/2-libglx-dev_1.3.1-1~oibaf~b_i386.deb (--unpack):
trying to overwrite '/usr/include/GL/glx.h', which is also in package mesa-common-dev:i386 20.0.8-0ubuntu1~18.04.1
Preparing to unpack .../3-libgl-dev_1.3.1-1~oibaf~b_i386.deb ...
Unpacking libgl-dev:i386 (1.3.1-1~oibaf~b) ...
dpkg: error processing archive /tmp/apt-dpkg-install-QGZVH6/3-libgl-dev_1.3.1-1~oibaf~b_i386.deb (--unpack):
trying to overwrite '/usr/include/GL/gl.h', which is also in package mesa-common-dev:i386 20.0.8-0ubuntu1~18.04.1
No apport report written because MaxReports is reached already
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../4-libegl-dev_1.3.1-1~oibaf~b_i386.deb ...
Unpacking libegl-dev:i386 (1.3.1-1~oibaf~b) ...
dpkg: error processing archive /tmp/apt-dpkg-install-QGZVH6/4-libegl-dev_1.3.1-1~oibaf~b_i386.deb (--unpack):
trying to overwrite '/usr/include/EGL/egl.h', which is also in package libegl1-mesa-dev:i386 20.0.8-0ubuntu1~18.04.1
No apport report written because MaxReports is reached already
Preparing to unpack .../5-libgles-dev_1.3.1-1~oibaf~b_i386.deb ...
Unpacking libgles-dev:i386 (1.3.1-1~oibaf~b) ...
dpkg: error processing archive /tmp/apt-dpkg-install-QGZVH6/5-libgles-dev_1.3.1-1~oibaf~b_i386.deb (--unpack):
trying to overwrite '/usr/include/GLES2/gl2.h', which is also in package libgles2-mesa-dev:i386 20.0.8-0ubuntu1~18.04.1
No apport report written because MaxReports is reached already
Preparing to unpack .../6-libegl-dev_1.3.1-1~oibaf~b_amd64.deb ...
Unpacking libegl-dev:amd64 (1.3.1-1~oibaf~b) ...
dpkg: error processing archive /tmp/apt-dpkg-install-QGZVH6/6-libegl-dev_1.3.1-1~oibaf~b_amd64.deb (--unpack):
trying to overwrite '/usr/include/EGL/egl.h', which is also in package libegl1-mesa-dev:i386 20.0.8-0ubuntu1~18.04.1
No apport report written because MaxReports is reached already
Preparing to unpack .../7-libgles-dev_1.3.1-1~oibaf~b_amd64.deb ...
Unpacking libgles-dev:amd64 (1.3.1-1~oibaf~b) ...
dpkg: error processing archive /tmp/apt-dpkg-install-QGZVH6/7-libgles-dev_1.3.1-1~oibaf~b_amd64.deb (--unpack):
trying to overwrite '/usr/include/GLES2/gl2.h', which is also in package libgles2-mesa-dev:i386 20.0.8-0ubuntu1~18.04.1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
/tmp/apt-dpkg-install-QGZVH6/0-libglx-dev_1.3.1-1~oibaf~b_amd64.deb
/tmp/apt-dpkg-install-QGZVH6/1-libgl-dev_1.3.1-1~oibaf~b_amd64.deb
/tmp/apt-dpkg-install-QGZVH6/2-libglx-dev_1.3.1-1~oibaf~b_i386.deb
/tmp/apt-dpkg-install-QGZVH6/3-libgl-dev_1.3.1-1~oibaf~b_i386.deb
/tmp/apt-dpkg-install-QGZVH6/4-libegl-dev_1.3.1-1~oibaf~b_i386.deb
/tmp/apt-dpkg-install-QGZVH6/5-libgles-dev_1.3.1-1~oibaf~b_i386.deb
/tmp/apt-dpkg-install-QGZVH6/6-libegl-dev_1.3.1-1~oibaf~b_amd64.deb
/tmp/apt-dpkg-install-QGZVH6/7-libgles-dev_1.3.1-1~oibaf~b_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我找不到要安装的依赖项,当我尝试安装时,它给出了相同的错误,并且绕了一圈...有什么想法吗?
更新:
benjamin@benjamin-ThinkPad-X260:~$ apt-cache policy mesa-common-dev
mesa-common-dev:
Installed: 20.0.8-0ubuntu1~18.04.1
Candidate: 20.2~git2007261930.18fe13~oibaf~b
Version table:
20.2~git2007261930.18fe13~oibaf~b 500
500 http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu bionic/main amd64 Packages
20.1.4~kisak1~b 500
500 http://ppa.launchpad.net/kisak/kisak-mesa/ubuntu bionic/main amd64 Packages
*** 20.0.8-0ubuntu1~18.04.1 100
100 /var/lib/dpkg/status
18.0.0~rc5-1ubuntu1 500
500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
benjamin@benjamin-ThinkPad-X260:~$ apt-cache policy libgl-dev
libgl-dev:
Installed: (none)
Candidate: 1.3.1-1~oibaf~b
Version table:
1.3.1-1~oibaf~b 500
500 http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu bionic/main amd64 Packages
1.3.0-7~kisak~b 500
500 http://ppa.launchpad.net/kisak/kisak-mesa/ubuntu bionic/main amd64 Packages
答案1
看起来它正在尝试从 oibaf 的 PPA 和默认的 Ubuntu 源安装相同的文件。我很想尝试简单地清除然后重新添加 PPA:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:oibaf/graphics-drivers
sudo apt update && sudo apt upgrade
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update && sudo apt upgrade
希望这能平息冲突,而不需要采取更繁重的措施。如果不行,就需要进行一些调查。