0

Installing mongodb 3.6 on ubuntu 22 keeps throwing this error!!

The following packages have unmet dependencies:
 mongodb-org-mongos : Depends: libssl1.0.0 (>= 1.0.2~beta3) but it is not installable
 mongodb-org-server : Depends: libssl1.0.0 (>= 1.0.2~beta3) but it is not installable
 mongodb-org-shell : Depends: libssl1.0.0 (>= 1.0.2~beta3) but it is not installable
 mongodb-org-tools : Depends: libssl1.0.0 (>= 1.0.2~beta3) but it is not installable
E: Unable to correct problems, you have held broken packages

I am new to ubuntu system but tried everything available in the internet. also Downgraded the libsssl1
sudo wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb

2

2 Answers 2

1

MongoDB 3.6 is relatively old (EOL/EOS April 2021) and not recommended for production use unless the case requires it (the latest is 6.1 as of reading this text)

If you need it only for some testing to not pollute your Ubuntu 22 installation I would recommend to install it manually in some folder separate for your testing only, described in following steps:

  1. Download the 3.6 package from the archive(example 3.6.22):

    https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-3.6.22.tgz
    
  2. Uncompress the binary files in some folder ( example /database/bin ) .

  3. If needed download the expected ssl libraries and extract the libcrypto package to expected location:

    http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/

    sudo cp libcrypto.so.1.0.0 /usr/lib/

  4. Prepare some nice config file and store in /database/bin/mydb.conf :

    storage:
     dbPath: /database/db1
     directoryPerDB: true
     journal:
       enabled: true
     wiredTiger:
       engineConfig:
         cacheSizeGB: 1
         directoryForIndexes: true
    
    systemLog:
      destination: file
      logAppend: true
      path: /database/log/db1.log
    
    net:
      port: 20000
      bindIp: 127.0.0.1
    
    
    processManagement:
      fork: true
    
  5. Create the necessary directories and start the mongod binary:

    mkdir -p /database/db1
    mkdir -p /database/log 
    /database/bin/mongod --config mydb.conf
    
  6. You can access the database as follow:

    /database/bin/mongo --port 20000
    
1
  • 1
    You can track the tags for releases and release candidates in the 6.X series with git ls-remote https://github.com/mongodb/mongo.git 'r6.*'.
    – rickhg12hs
    Feb 6 at 15:09
0

To install the latest stable version, issue the following

sudo apt-get install -y mongodb-org

To get rid of "E: Unable to correct problems, you have held broken packages " open the terminal with "Ctrl + Alt + T" and type:

sudo apt install --fix-missing

Hope that helps...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.