I am trying to install mongodb on my Ubuntu 18.04 LTS, but it has the following error saying
You might want to run \'apt --fix-broken install\' to correct
For Ubuntu version 18.04 LTS, it's better if you will install MongoDB manually.
I need to go through the following steps to make it run on my Ubuntu 18.04:
mongod: /usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by mongod)
To fix this problem, you need to uninstall "libcurl4" dependent library by using the following command
sudo apt-get remove libcurl4
Then need to install back lower curl lib version (i.e. "libcurl3"), as mongo expects it on ubuntu version "18.04"
sudo apt-get install libcurl3
You may need to use "sudo" to fork the data and log directories with the installation if it fails with the manual steps
sudo mongod --dbpath /var/lib/mongo --logpath /var/log/mongodb/mongod.log --fork
you can run "mongo" command now to see the mongo shell running.
It works for me.