I have followed this tutorial https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ but I get,

You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: mongodb-org-server : Depends: libcurl3 (>= 7.16.2) but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Is there any solution? Or what ubuntu version I need to install in order to install mongoDB? My OS version when I run: lsb_release -a

No LSB modules are available.
Distributor ID: elementary
Description:    elementary OS 5.0 Juno
Release:    5.0
Codename:   juno


  • 1
    I went through the steps in that link, and everything went fine. Try running sudo apt clean && sudo apt autoclean. Next, run sudo apt --fix-broken install. Can you also add to your question the output of curl --version?
    – Vlad
    Dec 2 '19 at 9:23

Follow this, It should work, elementary OS Juno is based on Ubuntu 18.04 Bionic, So follow the same reference:

Follow this order:

wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -

echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list

sudo apt-get update

sudo apt-get install -y mongodb-org


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.