libgl1-mesa-dri:i386 libglx-mesa0:i386 오류

libgl1-mesa-dri:i386 libglx-mesa0:i386 오류

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 드라이버를 설치하지 않았습니다. 그렇다면 문제는 무엇이며, OS를 다시 설치하지 않고 이 문제를 어떻게 해결할 수 있습니까? 저는 쿠분투 20.04를 사용합니다. 사실 이 오류가 나타날 때마다 리눅스를 사용하고 싶은 마음이 점점 줄어들고 있습니다. 나는 Linux에서 행동의 자유를 약속 받았지만 실제로 어떤 종류의 프로그램을 설치하면 모든 것이 깨졌습니다.

답변1

이로써 대부분의 문제가 해결되었습니다. apt전혀 작동하지 않았기 때문에 이 방법으로 삭제하면 도움이 되었습니다.

sudo dpkg --remove --force-remove-reinstreq libgl1-amber-dri

답변2

git 서버에서 다운로드했기 때문인 것 같습니다 libgl1-mesa-dri:i386(롤링 릴리스인 것 같아요). 하지만 amd64 버전이 이전 안정 버전이고 이로 인해 충돌이 발생합니다.

노드를 다시 실행 하고 설치해 보세요. 그런 다음 안정적인 저장소에서 다시 sudo apt remove libgl1-mesa-dri:i386설치할 수 있습니다.libgl1-mesa-dri:i386

출력을 실행 cat /etc/apt/sources.list하면 나중에 이런 일이 발생하지 않도록 방지하는 방법을 알려드릴 수 있습니다. 최첨단 저장소 중 하나가 최신의 불안정한 버전을 다운로드하는 경향이 있는 것 같습니다.

관련 정보