Ubuntu20.04 + WLS1, libc 다운그레이드 후 APT가 손상됨

Ubuntu20.04 + WLS1, libc 다운그레이드 후 APT가 손상됨

Ubuntu20.04+WSL1을 사용하고 있습니다. sleep 명령이 작동하지 않는 것으로 나타났습니다. 오류를 검색한 후 이 문제를 발견했습니다.https://github.com/microsoft/WSL/issues/4898

그런 다음 의견 중 하나를 기반으로 다음 해결 방법을 적용했습니다.

wget "https://launchpad.net/~rafaeldtinoco/+archive/ubuntu/lp1871129/+build/19152555/+files/libc6_2.31-0ubuntu8+lp1871129~1_amd64.deb"
sudo dpkg -i libc6_2.31-0ubuntu8+lp1871129~1_amd64.deb

이제 sleep 명령이 작동합니다. 그러나 많은 것들이 apt upgrade다음과 같은 오류로 인해 작동을 멈췄습니다.

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:
 libc6-dev : Depends: libc6 (= 2.31-0ubuntu9) but 2.31-0ubuntu8+lp1871129~1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

제안된 대로 수행하려고 하면 apt --fix-broken install다음과 같은 오류가 발생합니다.

sudo 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:
  libc6
Suggested packages:
  glibc-doc
The following packages will be upgraded:
  libc6
1 upgraded, 0 newly installed, 0 to remove and 43 not upgraded.
Need to get 0 B/2713 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 63162 files and directories currently installed.)
Preparing to unpack .../libc6_2.31-0ubuntu9_amd64.deb ...
Unpacking libc6:amd64 (2.31-0ubuntu9) over (2.31-0ubuntu8+lp1871129~1) ...
Setting up libc6:amd64 (2.31-0ubuntu9) ...
sleep: cannot read realtime clock: Invalid argument
dpkg: error processing package libc6:amd64 (--configure):
 installed libc6:amd64 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

문제는 내가 변경한 내용을 어떻게 되돌릴 수 있느냐는 것입니다. 아니면 apt에서 받은 위의 오류를 어떻게 수정할 수 있나요?

답변1

첫째, 여기서 무엇을 하고 있나요?

wget "https://launchpad.net/~rafaeldtinoco/+archive/ubuntu/lp1871129/+build/19152555/+files/libc6_2.31-0ubuntu8+lp1871129~1_amd64.deb"
sudo dpkg -i libc6_2.31-0ubuntu8+lp1871129~1_amd64.deb

이 콘텐츠를 만든 사람이 .deb귀하의 컴퓨터를 완전히 손상시킬 수 있습니다. 무작위 지침에 따라 문제가 발생할 수 있습니다.

이 저장소에서 설치하는 경우 소프트웨어 소스에 추가해야 합니다.

deb http://ppa.launchpad.net/rafaeldtinoco/lp1871129/ubuntu focal main 

이런 방식으로 종속성을 끌어오거나 조기에 거부할 수 있습니다.

이제 일어나는 일은 다음과 같습니다.

  • glibc 버전 2.31-0ubuntu9가 설치되어 있습니다.
  • 이 명령을 사용하여 버전 2.31-0ubuntu8+lp1871129(reafaeldtinoco가 추가한 패치 버전 2.31-0ubuntu8)를 설치했습니다. 너다운그레이드이전 glibc 버전으로
  • libc 패키지는 시스템의 거의 모든 프로그램에서 사용됩니다.
  • apt --fix-broken install해결책 찾기: 2.31-0ubuntu9로 다시 설치하세요. 그러나 설치의 후처리 단계가 사용되었으나 sleep이제 손상되었기 때문에 실패합니다.

또는 모든 것을 2.31-0ubuntu8로 다운그레이드할 수 있지만 강제로 수동으로 다운그레이드해야 하는 패키지가 많을 수 있습니다. 또 다른 해결책은 2.31-0ubuntu9의 패치 버전을 만드는 것이지만 이 작업을 원하지 않을 수도 있습니다.

이제 2.31-0ubuntu8이 설치되었지만 아직 구성되지 않았습니다.

다음을 수행하여 rafaeldtinoco libc6 버전으로 강제로 다운그레이드하고 변경되지 않은 상태로 유지할 수 있습니다.

sudo add-apt-repository ppa:rafaeldtinoco/lp1871129 # Install rafaeldtinoco/lp1871129 repo
sudo apt-get update
sudo apt-get install libc6=2.31-0ubuntu8+lp1871129~1 # Downgrade to exactly this version
sudo apt-mark hold libc6 # Do not upgrade libc6

관련 정보