Всем привет, недавно зашёл в кали и сразу проблемы. пишу apt-get install ftp пишет ошибку
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
пытаюсь фиксить её, пишет
E: Sub-process /usr/bin/dpkg returned an error code (1)
пытаюсь фиксить эту ошибку и опять
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Как исправить? вот полный лог
1.
apt-get install ftp
Вывод:
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 going to be installed
Depends: ncal but it is not going to be installed
libc-bin : Depends: libc6 (< 2.31) but 2.31-2 is to be installed
Recommends: manpages but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
2.
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:
calendar cpp cpp-10 gcc-10-base libc-bin libgcc-s1 libisl22 libmpc3 libmpfr6 libstdc++6 ncal
Suggested packages:
cpp-doc gcc-10-locales
Recommended packages:
manpages
The following NEW packages will be installed:
calendar cpp cpp-10 libisl22 libmpc3 libmpfr6 ncal
The following packages will be upgraded:
gcc-10-base libc-bin libgcc-s1 libstdc++6
4 upgraded, 7 newly installed, 0 to remove and 74 not upgraded.
3 not fully installed or removed.
Need to get 0 B/12.4 MB of archives.
After this operation, 35.2 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 processing:
libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@MSI:~#
Приветствую! Видно, что ошибки меняются, например, последняя ошибка из-за того, что обновление пакета не завершено.
Поэтому выполните один раз команду
sudo apt update
А затем несколько раз команду
sudo apt --fix-broken install
пока сообщения об ошибках не станут одинаковыми — или пока проблема не решится. Затем напишите, на какой ошибке застряли.
root@MSI:~# 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:
calendar cpp cpp-10 gcc-10-base libc-bin libgcc-s1 libisl22 libmpc3 libmpfr6 libstdc++6 ncal
Suggested packages:
cpp-doc gcc-10-locales
Recommended packages:
manpages
The following NEW packages will be installed:
calendar cpp cpp-10 libisl22 libmpc3 libmpfr6 ncal
The following packages will be upgraded:
gcc-10-base libc-bin libgcc-s1 libstdc++6
4 upgraded, 7 newly installed, 0 to remove and 74 not upgraded.
3 not fully installed or removed.
Need to get 0 B/12.4 MB of archives.
After this operation, 35.2 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 processing:
libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@MSI:~# 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:
calendar cpp cpp-10 gcc-10-base libc-bin libgcc-s1 libisl22 libmpc3 libmpfr6 libstdc++6 ncal
Suggested packages:
cpp-doc gcc-10-locales
Recommended packages:
manpages
The following NEW packages will be installed:
calendar cpp cpp-10 libisl22 libmpc3 libmpfr6 ncal
The following packages will be upgraded:
gcc-10-base libc-bin libgcc-s1 libstdc++6
4 upgraded, 7 newly installed, 0 to remove and 74 not upgraded.
3 not fully installed or removed.
Need to get 0 B/12.4 MB of archives.
After this operation, 35.2 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 processing:
libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
Эта «красота» происходит в WSL? Если да, то нужно обязательно это указывать.
Попробуйте для исправления ошибки выполнить:
sudo -i
sudo mv /bin/sleep /bin/sleep~ ; touch /bin/sleep ; chmod +x /bin/sleep
Почему нужно указывать, что это WSL? Возможно вы не понимаете, что такое WSL, а ведь это вообще не Linux. Это я объясняю в самом начале статьи «Как установить Kali Linux с Win-KeX (графический интерфейс) в WSL2 (подсистему Windows для Linux)».
Там же я говорю, что вы столкнётесь с самыми необычными ошибками. Самое правильное, что можно сделать, забыть про WSL и пользоваться полноценной виртуальной машиной, например, VirtualBox. Иначе так и будете решать бессмысленные проблемы. «Сам себе злобный Буратино».
Большое спасибо) помогло, теперь всё работает.)