WSL Kali Linux를 설치한 후 진입해서 업그레이드에 apt-get update
들어갔을 때 apt-get dist-upgrade
이런 내용을 봤습니다.
$ sudo apt-get dist-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:
bsdmainutils : Depends: calendar but it is not installed
Depends: ncal but it is not installed
libc-bin : Depends: libc6 (< 2.31) but 2.31-2 is installed
Recommends: manpages but it is not 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
The following additional packages will be installed:
calendar cpp cpp-9 libc-bin libisl22 libmpc3 libmpfr6 ncal
Suggested packages:
cpp-doc gcc-9-locales
Recommended packages:
manpages
The following NEW packages will be installed:
calendar cpp cpp-9 libisl22 libmpc3 libmpfr6 ncal
The following packages will be upgraded:
libc-bin
1 upgraded, 7 newly installed, 0 to remove and 67 not upgraded.
6 not fully installed or removed.
Need to get 0 B/13.4 MB of archives.
After this operation, 34.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up libc6:amd64 (2.31-2) ...
Checking for services that may need to be restarted...
Checking init scripts...
Nothing to restart.
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 procesing:
libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
여기 스크린샷이 있습니다. 이 문제를 해결하는 데 정말 도움이 필요해요
답변1
libc6의 postinst 편집
vi /var/lib/dpkg/info/libc6\:amd64.postinst
그리고 그 줄을 주석 처리하세요
set -e
손상된 프로그램을 복구하려면 다시 실행하세요.
apt-get --fix-broken install