- Как пофиксить ошибку?
- Unmet dependencies kali linux
- A foreword: please run ‘apt update’
- Package is to be installed, however it is not going to be: please use ‘apt full-upgrade’
- The following package has been kept back
- A package needs a newer version, but there is no new version available
- A package is trying to overwrite a file and causing an error
- how to fix E: Unmet dependencies in kali linux? [duplicate]
- 1 Answer 1
Как пофиксить ошибку?
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).
Как исправить? вот полный лог
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).
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
пока сообщения об ошибках не станут одинаковыми — или пока проблема не решится. Затем напишите, на какой ошибке застряли.
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 . Иначе так и будете решать бессмысленные проблемы. «Сам себе злобный Буратино».
Unmet dependencies kali linux
This page is due for more content as issues come up that need addressing. If you have an issue with APT that is not addressed in this page, please create a merge request with the steps to solve the problem or address it, or an issue if you are unaware of how to solve the problem but would like to see it added to this page.
A foreword: please run ‘apt update’
Did you run apt update ? You should. Before installing a package ( apt install . ) or upgrading your system ( apt full-upgrade ), you should always run apt update . This is how apt works, there’s no way around it, and this will fix the most bizarre issues you might encounter.
[email protected]:~$ sudo apt update Get:1 http://http.kali.org/kali kali-rolling InRelease [41.2 kB] [. ]
Package is to be installed, however it is not going to be: please use ‘apt full-upgrade’
[email protected]:~$ sudo apt upgrade Reading package lists. Done Building dependency tree. Done Reading state information. Done Calculating upgrade. Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libwacom9 : Depends: libwacom-common (= 2.2.0-1) but 1.8-2 is to be installed E: Broken packages
This is a common “issue” that an APT user may experience. This however is not a true error.
Let’s step back and take some time to learn about APT basics. There are two different commands that can be used to upgrade your system: apt ugrade and apt full-upgrade . The first one, “upgrade”, is used to install available upgrades of all packages currently installed on the system. New packages will be installed if required to satisfy dependencies, but existing packages will never be removed. In short, it can be seen as a conservative upgrade. The second command, “full-upgrade”, performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole.
In practice, in a rolling distribution like Kali Linux, packages and their dependencies are updated all the time, and it’s often necessary to remove some packages in order to make room for new packages. Therefore the command “apt upgrade” isn’t really useful, and can even be counter-productive. We recommend to always use “apt full-upgrade” to keep your system updated.
It’s also true that “full-upgrade” is a bit more risky than “upgrade”, and APT can sometimes (rarely) try to uninstall important packages, leaving you with an unusable system. Therefore you should always pay attention to the list of packages that will be removed. If this list is big (say, compared to the list of packages to upgrade, or new packages to install), then you’d better pause for a moment. Experienced users will be able to know what to do, but for others? If you’re really unsure, maybe it’s best not to update your system now. Try again in a few days: packages will have changed again, and APT might come up with a better proposition.
You’re also free to open a bug at https://bugs.kali.org. Please paste the part of your terminal with the APT command(s) you’re running, along with the output. Kali Linux developers will be able to assess the situation. It could be that a bug in package dependencies leads to APT doing the wrong thing, and this is something we can fix.
To sum up: always upgrade your system with apt full-upgrade .
The following package has been kept back
[email protected]:~$ sudo apt full-upgrade [. ] The following packages have been kept back: kali-desktop-xfce [. ]
Sometimes, APT doesn’t dare to upgrade a package, usually because it will remove other packages. In those cases, you have to be explicit and install the package manually:
[email protected]:~$ sudo apt install kali-desktop-xfce [. ] The following packages will be REMOVED: pipewire-media-session The following packages will be upgraded: [. ] kali-desktop-xfce [. ] Do you want to continue? [Y/n] n
In the example above, we can see that pipewire-media-session was blocking apt from upgrading kali-desktop-xfce . But after we asked to upgrade it explicitly (note that running “apt install” on a package already installed will in fact upgrade it), we now see what was the issue, and we can confirm that we’re Ok with removing pipewire-media-session . That’s enough to unblock the situation.
A package needs a newer version, but there is no new version available
This will likely happen more often when using kali-dev or kali-experimental , and may happen for two reasons. The first is that the package is still being tested, and this will make its way into the repo soon. The second is that there are conflicts with some dependencies, and these will need to be resolved first.
To figure out which may be the case in your situation, you can look up the package’s page on Debian’s side or if it belongs to Kali see if there are any bug reports on bugs.kali.org. Either way, the issue will be sorted out and will likely be resolved within a couple of weeks in most cases.
A package is trying to overwrite a file and causing an error
This can occur when files move between packages and don’t include the proper packaging field set to tell it that it is a replacing something else. In most cases this can be solved by retrying the installation or upgrade. In other cases, the APT command can have -o dpkg::options::=»—force-overwrite» added in order to tell dpkg to ignore the overwrite error.
For extra information and a more detailed understanding of this error, you can read about it here
how to fix E: Unmet dependencies in kali linux? [duplicate]
Hello and welcome to the Unix and Linux stack exchange site! Please review the Help Center for information on how to best post to this site. Have you tried apt —fix-broken install as your error message suggests? Kali Linux, as pointed out in official documentation, is not really designed to handle installing whatever. It is pretty much a WYSIWYG style Linux distro.
if the version of Kali Linux that you are using is as old as you say it is you need to upgrade. Your dependencies are missing because they are so far behind what is current. That is the issue with using a rolling release distro is you need to keep some level of parity with updates to maintain a working system. To be honest it may be easier to start over with a fresh install of the latest iso available at kali.org. Backup any important data you have and start over.
1 Answer 1
First, as the error message describes, you should probably try running:
Second, you should confirm that you want to specifically install Wine32 and not just standard Wine. It appears that the errors specifically relate to 32-bit dependencies (i386) which, if you’re on a 64-bit machine, you probably won’t have installed. Alternatively, if you really want Wine32, you could try installing libc6:i386 manually.
Last, I’d mention that Kali isn’t really intended for desktop usage. The only reason most users would want Wine on Kali would be for disassembly/reverse engineering. I am assuming, based on that you’re asking this question, that that isn’t what you’re doing.
I would recommend switching to a more desktop focused and beginner friendly distro and using Kali in a VM or as a live-boot tool.