I am new to Kali and just installed on my WSL2. I wanted to install mongodb but getting error that a library is missing and I am not able to download. I need help in fixing this below is the response i get
┌──(kaliengr㉿DESKTOP-17RL031)-[~]
└─$ sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree... Done
Reading state information... 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:
mongodb-org-mongos : Depends: libssl1.1 (>= 1.1.1) but it is not installable
mongodb-org-server : Depends: libssl1.1 (>= 1.1.1) but it is not installable
E: Unable to correct problems, you have held broken packages.
┌──(kaliengr㉿DESKTOP-17RL031)-[~]
└─$ sudo apt-get install libssl1.1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package libssl1.1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libssl1.1' has no installation candidate
┌──(kaliengr㉿DESKTOP-17RL031)-[~]
└─$
┏━(Message from Kali developers)
┃
┃ This is a minimal installation of Kali Linux, you likely
┃ want to install supplementary tools. Learn how:
┃ ⇒ https://www.kali.org/docs/troubleshooting/common-minimum-setup/
┃
┗━(Run: “touch ~/.hushlogin” to hide this message)
┌──(kaliengr㉿DESKTOP-17RL031)-[~]
└─$ apt update
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
┌──(kaliengr㉿DESKTOP-17RL031)-[~]
└─$ sudo apt update
[sudo] password for kaliengr:
Ign:1 http://repo.mongodb.org/apt/debian bullseye/mongodb-org/7.0 InRelease
Hit:2 http://repo.mongodb.org/apt/debian bullseye/mongodb-org/7.0 Release
Get:4 http://kali.download/kali kali-rolling InRelease [41.2 kB]
Get:5 http://kali.download/kali kali-rolling/main amd64 Packages [19.5 MB]
Get:6 http://kali.download/kali kali-rolling/main amd64 Contents (deb) [45.9 MB]
Get:7 http://kali.download/kali kali-rolling/non-free amd64 Packages [226 kB]
Get:8 http://kali.download/kali kali-rolling/non-free amd64 Contents (deb) [913 kB]
Fetched 66.6 MB in 58s (1,150 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
8 packages can be upgraded. Run 'apt list --upgradable' to see them.
┌──(kaliengr㉿DESKTOP-17RL031)-[~]
└─$ sudo apt install -y mongodb-org
Reading package lists... Done
Building dependency tree... Done
Reading state information... 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:
mongodb-org-mongos : Depends: libssl1.1 (>= 1.1.1) but it is not installable
mongodb-org-server : Depends: libssl1.1 (>= 1.1.1) but it is not installable
E: Unable to correct problems, you have held broken packages.
┌──(kaliengr㉿DESKTOP-17RL031)-[~]
└─$
ok, seems that the mongodb-org version shipped by Kali is a bit outdated, cause the current version of libssl is 3, not 1.1. Try to download the 1.1 .deb file from a mirror https://packages.debian.org/bullseye/amd64/libssl1.1/download, e.g. via
You might need to identify the held packages and unhold them so that they can be upgraded or removed. You can list them with:
apt-mark showhold
or:
dpkg -l | grep "^hi"
Of course, the error message might be wrong. If so, this won't help.
Also, when I check with:
apt-cache search mongodb
I don't see a mongodb-org package on kali. I only see: mongodb, mongodb-clients, mongodb-server, and a couple of other related packages. Can you see these? Perhaps you can install the mongodb metapackage instead. If not, there might be something wierd with your repository choice(s).
I just installed mongodb on kali, and got version is 1:6.1.1-0kali6
the message E: Unable to correct problems, you have held broken packages relies to the 2 preceeding lines regarding mongodb*. They couldn't be installed correctly, i.e. they are broken. Usually this is indicated by iU in the 1st column of dpkg -l pkg output. A correctly installed packages is indicated by ii:
$ dpkg -l vim
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii vim 2:9.0.1378-2 amd64 Vi IMproved - enhanced vi editor
@Oluadepe Do you have tried to install libssl1.1 via the suggested method?
The fact that the commands to show held packages didn't show anything means that the error message you got earlier wasn't correct. It must have been an assumption on the part of the program that produced it.
If you don't see the same mongodb packages when you run apt-cache search mongodb, it might mean that there's something wrong with your kali repository. It might be a good idea to do a fresh install of kali unless you have reasons not to.
you might be better (iIn, that it may be simpler) to do a fresh install, then install a package manager to install the supplemental software (https://linuxconfig.org/gui-software-installers-for-kali-linux) , however, feel free to beat yourself up trying to sort out your existing mess .