当我尝试使用 apt 我有这个错误:
~# apt install nodejs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libgl1-mesa-dri : Depends: libglapi-mesa (= 22.0.5-0ubuntu0.1) but 22.2.0+git2210042354.d4d47ef6efa~j~mesarc1 is to be installed
Breaks: libgl1-mesa-dri:i386 (!= 22.0.5-0ubuntu0.1) but 22.2.0+git2210042354.d4d47ef6efa~j~mesarc1 is to be installed
libgl1-mesa-dri:i386 : Breaks: libgl1-mesa-dri (!= 22.2.0+git2210042354.d4d47ef6efa~j~mesarc1) but 22.0.5-0ubuntu0.1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
dpkg --configure --pending 显示:
~# dpkg --configure --pending
dpkg: error processing package libgl1-mesa-dri:i386 (--configure):
package libgl1-mesa-dri:i386 22.2.0+git2210042354.d4d47ef6efa~j~mesarc1 cannot be configured because libgl1-mesa-dri:amd64 is at a different version (22.0.5-0ubuntu0.1)
dpkg: dependency problems prevent configuration of libglx-mesa0:i386:
libglx-mesa0:i386 depends on libgl1-mesa-dri; however:
Package libgl1-mesa-dri:i386 is not configured yet.
dpkg: error processing package libglx-mesa0:i386 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libgl1-mesa-dri:i386
libglx-mesa0:i386
当我使用 apt --fix broken install 我有这个:
apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libc-ares2 libgl1-amber-dri libllvm13 libllvm13:i386 libnode72
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
libgl1-mesa-dri
The following packages will be upgraded:
libgl1-mesa-dri
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 0 B/7 888 kB of archives.
After this operation, 393 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 241868 files and directories currently installed.)
Preparing to unpack .../libgl1-mesa-dri_22.2.0+git2210042354.d4d47ef6efa~j~mesarc1_amd64.deb ...
Unpacking libgl1-mesa-dri:amd64 (22.2.0+git2210042354.d4d47ef6efa~j~mesarc1) over (22.0.5-0ubuntu0.1) ...
dpkg: error processing archive /var/cache/apt/archives/libgl1-mesa-dri_22.2.0+git2210042354.d4d47ef6efa~j~mesarc1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/dri/i915_dri.so', which is also in package libgl1-amber-dri:amd64 21.3.7-0ubuntu1
Errors were encountered while processing:
/var/cache/apt/archives/libgl1-mesa-dri_22.2.0+git2210042354.d4d47ef6efa~j~mesarc1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt list -i | grep libgl1* 输出:
sudo apt list -i | grep libgl1*
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libgl1-amber-dri/jammy,now 21.3.7-0ubuntu1 amd64 [installed,automatic]
libgl1-mesa-dri/jammy-updates,now 22.0.5-0ubuntu0.1 amd64 [installed,upgradable to: 22.2.0+git2210042354.d4d47ef6efa~j~mesarc1]
libgl1-mesa-dri/jammy,now 22.2.0+git2210042354.d4d47ef6efa~j~mesarc1 i386 [installed]
libgl1-mesa-glx/jammy,now 22.2.0+git2210042354.d4d47ef6efa~j~mesarc1 amd64 [installed,automatic]
libgl1/jammy,now 1.4.0-1 amd64 [installed]
libgl1/jammy,now 1.4.0-1 i386 [installed]
libglade2-0/jammy,now 1:2.6.4-2.4 amd64 [installed,automatic]
libglapi-mesa/jammy,now 22.2.0+git2210042354.d4d47ef6efa~j~mesarc1 amd64 [installed,automatic]
libglapi-mesa/jammy,now 22.2.0+git2210042354.d4d47ef6efa~j~mesarc1 i386 [installed,automatic]
libgles2/jammy,now 1.4.0-1 amd64 [installed,automatic]
libglib2.0-0/jammy,now 2.72.1-1 amd64 [installed,automatic]
libglib2.0-0/jammy,now 2.72.1-1 i386 [installed,automatic]
libglib2.0-bin/jammy,now 2.72.1-1 amd64 [installed,automatic]
libglib2.0-data/jammy,jammy,now 2.72.1-1 all [installed,automatic]
libglu1-mesa/jammy,now 9.0.2-1 amd64 [installed,automatic]
libglvnd0/jammy,now 1.4.0-1 amd64 [installed,automatic]
libglvnd0/jammy,now 1.4.0-1 i386 [installed,automatic]
libglx-mesa0/jammy,now 22.2.0+git2210042354.d4d47ef6efa~j~mesarc1 amd64 [installed,automatic]
libglx-mesa0/jammy,now 22.2.0+git2210042354.d4d47ef6efa~j~mesarc1 i386 [installed,automatic]
libglx0/jammy,now 1.4.0-1 amd64 [installed,automatic]
libglx0/jammy,now 1.4.0-1 i386 [installed,automatic]
sudo apt remove libgl1-mesa-dri:i386 显示:
sudo apt remove libgl1-mesa-dri:i386
[sudo] password for borys:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libgl1-mesa-dri : Depends: libglapi-mesa (= 22.0.5-0ubuntu0.1) but 22.2.0+git2210042354.d4d47ef6efa~j~mesarc1 is to be installed
libglx-mesa0:i386 : Depends: libgl1-mesa-dri:i386 but it is not going to be installed
steam-libs-i386:i386 : Depends: libgl1-mesa-dri:i386 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
borys@boryslinux:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libc-ares2 libgl1-amber-dri libllvm13 libllvm13:i386 libnode72
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libgl1-mesa-dri
The following packages will be upgraded:
libgl1-mesa-dri
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 0 B/7 888 kB of archives.
After this operation, 393 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 241868 files and directories currently installed.)
Preparing to unpack .../libgl1-mesa-dri_22.2.0+git2210042354.d4d47ef6efa~j~mesarc1_amd64.deb ...
Unpacking libgl1-mesa-dri:amd64 (22.2.0+git2210042354.d4d47ef6efa~j~mesarc1) over (22.0.5-0ubuntu0.1) ...
dpkg: error processing archive /var/cache/apt/archives/libgl1-mesa-dri_22.2.0+git2210042354.d4d47ef6efa~j~mesarc1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/dri/i915_dri.so', which is also in package libgl1-amber-dri:amd64 21.3.7-0ubuntu1
Errors were encountered while processing:
/var/cache/apt/archives/libgl1-mesa-dri_22.2.0+git2210042354.d4d47ef6efa~j~mesarc1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
猫 /etc/apt/sources.list 输出:
cat /etc/apt/sources.list
# deb cdrom:[Kubuntu 22.04.1 LTS _Jammy Jellyfish_ - Release amd64 (20220809.1)]/ jammy main multiverse restricted universe
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ua.archive.ubuntu.com/ubuntu/ jammy main restricted
# deb-src http://ua.archive.ubuntu.com/ubuntu/ jammy main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ua.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
# deb-src http://ua.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ua.archive.ubuntu.com/ubuntu/ jammy universe
# deb-src http://ua.archive.ubuntu.com/ubuntu/ jammy universe
deb http://ua.archive.ubuntu.com/ubuntu/ jammy-updates universe
# deb-src http://ua.archive.ubuntu.com/ubuntu/ jammy-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ua.archive.ubuntu.com/ubuntu/ jammy multiverse
# deb-src http://ua.archive.ubuntu.com/ubuntu/ jammy multiverse
deb http://ua.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
# deb-src http://ua.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ua.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://ua.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu jammy-security main restricted
# deb-src http://security.ubuntu.com/ubuntu jammy-security main restricted
deb http://security.ubuntu.com/ubuntu jammy-security universe
# deb-src http://security.ubuntu.com/ubuntu jammy-security universe
deb http://security.ubuntu.com/ubuntu jammy-security multiverse
# deb-src http://security.ubuntu.com/ubuntu jammy-security multiverse
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
sudo apt show libglapi-mesa -a 的输出:
sudo apt show libglapi-mesa -a
Package: libglapi-mesa
Version: 22.2.0+git2210042354.d4d47ef6efa~j~mesarc1
Priority: optional
Section: libs
Source: mesa
Maintainer: Ernst Sjöstrand <[email protected]>
Installed-Size: 466 kB
Depends: libc6 (>= 2.34)
Download-Size: 236 kB
APT-Manual-Installed: no
APT-Sources: https://ppa.launchpadcontent.net/ernstp/mesarc/ubuntu jammy/main amd64 Packages
Description: free implementation of the GL API -- shared library
The Mesa GL API module is responsible for dispatching all the gl*
functions. It is intended to be mainly used by both the libgles1-mesa
and libgles2-mesa packages.
Package: libglapi-mesa
Version: 22.0.5-0ubuntu0.1
Priority: optional
Section: libs
Source: mesa
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Debian X Strike Force <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 312 kB
Depends: libc6 (>= 2.34)
Homepage: https://mesa3d.org/
Task: ubuntu-desktop-minimal, ubuntu-desktop, ubuntu-desktop-raspi, kubuntu-desktop, xubuntu-core, xubuntu-desktop, lubuntu-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop, ubuntu-budgie-desktop-raspi
Download-Size: 35,3 kB
APT-Sources: http://ua.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
Description: free implementation of the GL API -- shared library
The Mesa GL API module is responsible for dispatching all the gl*
functions. It is intended to be mainly used by both the libgles1-mesa
and libgles2-mesa packages.
Package: libglapi-mesa
Version: 22.0.1-1ubuntu2
Priority: optional
Section: libs
Source: mesa
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Debian X Strike Force <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 312 kB
Depends: libc6 (>= 2.34)
Homepage: https://mesa3d.org/
Task: ubuntu-desktop-minimal, ubuntu-desktop, ubuntu-desktop-raspi, kubuntu-desktop, xubuntu-core, xubuntu-desktop, lubuntu-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop, ubuntu-budgie-desktop-raspi
Download-Size: 35,4 kB
APT-Sources: http://ua.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
Description: free implementation of the GL API -- shared library
The Mesa GL API module is responsible for dispatching all the gl*
functions. It is intended to be mainly used by both the libgles1-mesa
and libgles2-mesa packages.
我没有安装 gpu 驱动程序。那么问题是什么,如何在不重新安装操作系统的情况下解决这个问题?我使用 Kubuntu 20.04。其实每次出现这个错误我都越来越不想用linux了。我被承诺在 Linux 上自由行动,但事实上,在安装某种程序后,我的一切都崩溃了