데비안 10 dpkg/apt 다운그레이드 오류

데비안 10 dpkg/apt 다운그레이드 오류

Linux 초보자는 다음과 같습니다.

게임과 비디오 편집에 도움이 되도록 최신 버전의 AMD Mesa를 설치하려고 합니다. Buster 저장소에는 18.x 버전만 있는 것 같습니다. Sid 저장소의 패키지를 사용해 보았지만 apt -f install을 사용할 때 계속 다운그레이드됩니다. 나는 debian.org에서 Mesa 20에 필요한 모든 .deb 파일을 다운로드하고 dpkg -i를 사용하여 설치했습니다(DontBreakDebian에 따르면 이것은 나쁜 생각입니다). 수동으로 설치된 모든 패키지를 Buster에서 사용하는 버전으로 다시 다운그레이드하려고 합니다.

Inkscape를 예로 들어 보겠습니다(이미 설치됨).

root@CBTS-WBPC5:/home/cbts/Downloads# apt install inkscape
Reading package lists... Done
Building dependency tree       
Reading state information... Done
inkscape is already the newest version (0.92.4-3).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 i965-va-driver:i386 : Depends: libdrm2:i386 (>= 2.3.1) but it is not going to be installed
 libavutil56:i386 : Depends: libdrm2:i386 (>= 2.3.1) but it is not going to be installed
 libbsd0 : Breaks: libbsd0:i386 (!= 0.11.3-1) but 0.9.1-2+deb10u1 is to be installed
 libbsd0:i386 : Breaks: libbsd0 (!= 0.9.1-2+deb10u1) but 0.11.3-1 is to be installed
 libdrm-intel1:i386 : Depends: libdrm2:i386 (>= 2.4.38) but it is not going to be installed
 libdw1 : Depends: libelf1 (= 0.176-1.1) but 0.183-3 is to be installed
 libedit2 : Breaks: libedit2:i386 (!= 3.1-20191231-2+b1) but 3.1-20181209-1 is to be installed
 libedit2:i386 : Breaks: libedit2 (!= 3.1-20181209-1) but 3.1-20191231-2+b1 is to be installed
 libelf-dev : Depends: libelf1 (= 0.176-1.1) but 0.183-3 is to be installed
 libelf1 : Breaks: libelf1:i386 (!= 0.183-3) but 0.176-1.1 is to be installed
 libelf1:i386 : Breaks: libelf1 (!= 0.176-1.1) but 0.183-3 is to be installed
 libexpat1 : Breaks: libexpat1:i386 (!= 2.2.10-2) but 2.2.6-2+deb10u1 is to be installed
 libexpat1:i386 : Breaks: libexpat1 (!= 2.2.6-2+deb10u1) but 2.2.10-2 is to be installed
 libexpat1-dev : Depends: libexpat1 (= 2.2.6-2+deb10u1) but 2.2.10-2 is to be installed
 libncurses-dev : Depends: libtinfo6 (= 6.1+20181013-2+deb10u2) but 6.2+20201114-2 is to be installed
                  Depends: libncurses6 (= 6.1+20181013-2+deb10u2) but 6.2+20201114-2 is to be installed
 libncurses6 : Breaks: libncurses6:i386 (!= 6.2+20201114-2) but 6.1+20181013-2+deb10u2 is to be installed
 libncurses6:i386 : Breaks: libncurses6 (!= 6.1+20181013-2+deb10u2) but 6.2+20201114-2 is to be installed
 libncursesw6 : Depends: libtinfo6 (= 6.1+20181013-2+deb10u2) but 6.2+20201114-2 is to be installed
 libstdc++6 : Breaks: libstdc++6:i386 (!= 10.2.1-6) but 8.3.0-6 is to be installed
 libstdc++6:i386 : Breaks: libstdc++6 (!= 8.3.0-6) but 10.2.1-6 is to be installed
 libtinfo-dev : Depends: libtinfo6 (= 6.1+20181013-2+deb10u2) but 6.2+20201114-2 is to be installed
 libtinfo6 : Breaks: libtinfo6:i386 (!= 6.2+20201114-2) but 6.1+20181013-2+deb10u2 is to be installed
 libtinfo6:i386 : Breaks: libtinfo6 (!= 6.1+20181013-2+deb10u2) but 6.2+20201114-2 is to be installed
 libva-drm2:i386 : Depends: libdrm2:i386 (>= 2.4.16) but it is not going to be installed
 libva-x11-2:i386 : Depends: libdrm2:i386 (>= 2.3.1) but it is not going to be installed
 libvulkan-dev : Depends: libvulkan1 (= 1.1.97-2) but 1.2.162.0-1 is to be installed
 libvulkan1 : Depends: libc6 (>= 2.29) but 2.28-10 is to be installed
              Breaks: libvulkan1:i386 (!= 1.2.162.0-1) but 1.1.97-2 is to be installed
 libvulkan1:i386 : Breaks: libvulkan1 (!= 1.1.97-2) but 1.2.162.0-1 is to be installed
 libwayland-client0 : Breaks: libwayland-client0:i386 (!= 1.19.0-2) but 1.16.0-1 is to be installed
 libwayland-client0:i386 : Breaks: libwayland-client0 (!= 1.16.0-1) but 1.19.0-2 is to be installed
 libwayland-dev : Depends: libwayland-client0 (= 1.16.0-1) but 1.19.0-2 is to be installed
 libx11-6 : Breaks: libx11-6:i386 (!= 2:1.7.0-2) but 2:1.6.7-1+deb10u1 is to be installed
 libx11-6:i386 : Breaks: libx11-6 (!= 2:1.6.7-1+deb10u1) but 2:1.7.0-2 is to be installed
 libx11-dev : Depends: libx11-6 (= 2:1.6.7-1+deb10u1) but 2:1.7.0-2 is to be installed
 libx11-xcb-dev : Depends: libx11-xcb1 (= 2:1.6.7-1+deb10u1) but 2:1.7.0-2 is to be installed
 libx11-xcb1 : Breaks: libx11-xcb1:i386 (!= 2:1.7.0-2) but 2:1.6.7-1+deb10u1 is to be installed
 libx11-xcb1:i386 : Breaks: libx11-xcb1 (!= 2:1.6.7-1+deb10u1) but 2:1.7.0-2 is to be installed
 libxau-dev : Depends: libxau6 (= 1:1.0.8-1+b2) but 1:1.0.9-1 is to be installed
 libxau6 : Breaks: libxau6:i386 (!= 1:1.0.9-1) but 1:1.0.8-1+b2 is to be installed
 libxau6:i386 : Breaks: libxau6 (!= 1:1.0.8-1+b2) but 1:1.0.9-1 is to be installed
 libxcb-dri3-0 : Breaks: libxcb-dri3-0:i386 (!= 1.14-3) but 1.13.1-2 is to be installed
 libxcb-dri3-0:i386 : Breaks: libxcb-dri3-0 (!= 1.13.1-2) but 1.14-3 is to be installed
 libxcb-dri3-dev : Depends: libxcb-dri3-0 (= 1.13.1-2) but 1.14-3 is to be installed
 libxcb-present-dev : Depends: libxcb-present0 (= 1.13.1-2) but 1.14-3 is to be installed
 libxcb-present0 : Breaks: libxcb-present0:i386 (!= 1.14-3) but 1.13.1-2 is to be installed
 libxcb-present0:i386 : Breaks: libxcb-present0 (!= 1.13.1-2) but 1.14-3 is to be installed
 libxcb-randr0-dev : Depends: libxcb-randr0 (= 1.13.1-2) but 1.14-3 is to be installed
 libxcb-sync-dev : Depends: libxcb-sync1 (= 1.13.1-2) but 1.14-3 is to be installed
 libxcb-sync1 : Breaks: libxcb-sync1:i386 (!= 1.14-3) but 1.13.1-2 is to be installed
 libxcb-sync1:i386 : Breaks: libxcb-sync1 (!= 1.13.1-2) but 1.14-3 is to be installed
 libzstd1 : Breaks: libzstd1:i386 (!= 1.4.8+dfsg-2.1) but 1.3.8+dfsg-3+deb10u2 is to be installed
 libzstd1:i386 : Breaks: libzstd1 (!= 1.3.8+dfsg-3+deb10u2) but 1.4.8+dfsg-2.1 is to be installed
 zlib1g : Breaks: zlib1g:i386 (!= 1:1.2.11.dfsg-2) but 1:1.2.11.dfsg-1 is to be installed
 zlib1g:i386 : Breaks: zlib1g (!= 1:1.2.11.dfsg-1) but 1:1.2.11.dfsg-2 is to be installed
 zlib1g-dev : Depends: zlib1g (= 1:1.2.11.dfsg-1) but 1:1.2.11.dfsg-2 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

apt -f 설치 출력:

root@CBTS-WBPC5:/home/cbts/Downloads# apt -f 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:
  dkms libasound2-dev libblkid-dev libcaca-dev libelf1:i386 libgles1 libglib2.0-dev libglib2.0-dev-bin libglvnd-dev libglvnd0:i386
  libmount-dev libomxil-bellagio-bin libomxil-bellagio0 libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpng-dev libpng-tools
  libpulse-dev libselinux1-dev libsensors5:i386 libsepol1-dev libsfml-audio2.5 libsfml-graphics2.5 libsfml-network2.5
  libsfml-system2.5 libsfml-window2.5 libslang2-dev libtinfo5:i386 libwayland-server0:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386
  libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386 libxcb-xfixes0:i386 libxdamage1:i386 libxshmfence1:i386 mono-llvm-tools
  qt5-qmake qt5-qmake-bin qtbase5-dev-tools uuid-dev
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libbsd0 libdrm2:i386 libedit2 libelf1 libexpat1 libncurses6 libstdc++6 libtinfo6 libvulkan1 libwayland-client0 libx11-6
  libx11-xcb1 libxau6 libxcb-dri3-0 libxcb-present0 libxcb-randr0 libxcb-sync1 libzstd1 zlib1g
The following NEW packages will be installed:
  libdrm2:i386
The following packages will be DOWNGRADED:
  libbsd0 libedit2 libelf1 libexpat1 libncurses6 libstdc++6 libtinfo6 libvulkan1 libwayland-client0 libx11-6 libx11-xcb1 libxau6
  libxcb-dri3-0 libxcb-present0 libxcb-randr0 libxcb-sync1 libzstd1 zlib1g
0 upgraded, 1 newly installed, 18 downgraded, 0 to remove and 3 not upgraded.
42 not fully installed or removed.
Need to get 0 B/3,156 kB of archives.
After this operation, 480 kB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: warning: downgrading libstdc++6:amd64 from 10.2.1-6 to 8.3.0-6
(Reading database ... 313759 files and directories currently installed.)
Preparing to unpack .../libstdc++6_8.3.0-6_amd64.deb ...
Unpacking libstdc++6:amd64 (8.3.0-6) over (10.2.1-6) ...
dpkg: error processing archive /var/cache/apt/archives/libstdc++6_8.3.0-6_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libstdc++6', which is different from other instances of package libstdc++6:amd64
Errors were encountered while processing:
 /var/cache/apt/archives/libstdc++6_8.3.0-6_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

내가 시도한 것:

  • 적절한 -f 설치
  • Sid 저장소 및 적절한 업데이트를 제거했습니다.

uname -a: Linux CBTS-WBPC5 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux

답변1

아시다시피, 주요 버전 경계를 넘어 업그레이드하는 것은(오래된 안정에서 안정으로/불안정으로/에서 불안정 등)정말 나쁜 생각이야. 데비안에는 최신 버전에서 최신 패키지를 백포트하는 백포트 버전 트리가 있습니다.아니요현재 설치 중단 - 백포트되지 않은 경우 중단 없이 작동하는 것으로 아직 입증되지 않았기 때문입니다.

[아래의 전체 설명을 읽어보세요. 그것을 얻으십시오. 인터넷에 연결할 수 없고 네트워크를 볼 수 없는 상황이 발생하는 경우 나중에 참고할 수 있도록 인쇄해 두세요. 등. ]

문제를 해결하기 위해 해야 할 일이 너무 많습니다.고칠 수 있다면. 설치한 버전에 적합하지 않은 리포지토리를 삭제해야 합니다. 저는 개인적으로 Buster를 사용하고 있습니다.아니요안정적인 버전이 있더라도 사용하세요.지금같은 것. 결국 시드는 새로운 마구간이 되고, 버스터는 올드스테이블이 되어 업데이트하게 되면 지금 겪고 있는 것과 같은 혼란이 뒤따르게 되기 때문입니다. (개인적으로 나는 오래된 안정/안정/불안정이 데비안에서 고려되고 구현된 최악의 것 중 하나라고 생각합니다!)

다음 명령을 실행하여 적절한 캐시와 데이터베이스를 어느 정도 재설정합니다( sudo루트로 로그인한 동안 실행하지 않는 경우 명령 앞에 붙습니다).

apt-get 자동 제거
apt-get 정리
apt-get 자동 정리
apt-get 업데이트
apt-get 확인

[참고: 이 프로세스가 진행되는 동안아니요다른 업데이트나 다른 apt-get update명령을 실행합니다. ]

그런 다음 Sid 패키지 수준으로 업그레이드된 각 패키지를 찾아야 합니다(또는 사용 가능한 적절한 Buster 버전이 없음). 당신은 그것을 사용할 수 있습니다데비안의 패키지 검색 기능어떤 버전이 어떤 버전에 적용되는지 범위를 좁히는 데 도움이 됩니다. 지금은 --force 옵션을 사용하지 마세요!

다운그레이드해야 할 패키지 목록이 있으면 하나씩 다운그레이드해 보세요. 일부는 이 시점에서 실패하므로 건너뛰고 목록에 보관하고 성공한 항목은 삭제하세요. 목록을 다 살펴본 후에 다시 살펴보세요. 이것을 잠시 동안 반복하십시오. 그러면 결국 가장 문제가 많은 패키지 목록이 줄어들게 됩니다. 경우에 따라 패키지가 Sid에는 있지만 Buster에는 전혀 없을 수도 있습니다. 패키지를 삭제(지우기)하면 됩니다.

이 목록을 수십 번 살펴본 후에도 종속성이 다운그레이드되지 않거나 다운그레이드될 수 없기 때문에 전혀 다운그레이드되지 않는 패키지가 여전히 있을 수 있습니다. --force 옵션을 사용하여 다운그레이드해야 할 수도 있는 항목입니다. 선호--종속성을 강제로 다운그레이드합니다.첫 번째, 일단 다운그레이드되면 해당 패키지에 의존하는 패키지가 결국 자체적으로 다운그레이드할 수 있다고 결정할 수 있기 때문입니다.

이 과정을 수십번 반복해야 합니다. 꼭 필요한 경우가 아니면 서비스나 응용 프로그램을 다시 시작하거나 다시 시작하지 마십시오. (모든 종속성이 유사하게 다운그레이드되어 작동할 때까지 결국 실행을 방해하는 것을 다운그레이드하고 싶지는 않을 것입니다!)

결국 모든 패키지를 다운그레이드하거나 완고한 패키지 수가 줄어들게 됩니다. 이 시점에서는 다운그레이드하는 데 필요한 sep를 찾기 위해 수동으로 확인해야 합니다. 종속성 등을 확인해야 하며 Buster에 전혀 있어서는 안 되는 일부 패키지를 제거해야 할 수도 있습니다(Sid에만 해당됨).

만약에모든 것이 순조롭게 진행되면 모든 것을 Buster 내에서 유효한 상태로 되돌리려고 합니다. 이 지점에 도달하면 apt-get update모든 Buster 패키지를 사용 가능한 최신 버전으로 안전하게 업그레이드할 수 있습니다. (여전히 Sid에 속해야 하지만 Buster에 속하지 않는 패키지는 업데이트하지 않도록 주의하세요!)

모든 일이 잘 진행되었다면 모든 일이 끝났어야 합니다.

어느 시점에서 해결할 수 없는 문제가 발생하면 apt의 패키지 캐시, 패키지 목록 등을 수동으로 삭제하여 원래 상태로 재설정해야 할 수도 있습니다. 이러한 복잡성은 여기에 게시된 광범위한 설명이 필요한 또 다른 문제입니다. 웹에는 이 모든 것을 자세히 설명하는 여러 데비안 관련 페이지가 있으므로 찾아보세요. (그리고 인쇄하세요! 다운그레이드 과정에서 필요할 수 있는 모든 것에 하드 카피로 액세스하는 것이 좋습니다. 이로 인해 동시에 인터넷 액세스가 중단될 수 있으므로 읽고 참조하려면 종이 사본이 필요합니다. 인쇄할 내용이 너무 많아서 인터넷과 네트워크에 액세스하는 데 사용할 수 있는 두 번째 컴퓨터가 있습니다.

행운을 빌어요.

관련 정보