Unable to install mongodb properly on ubuntu 18.04 LTS

前端 未结 14 1296
盖世英雄少女心
盖世英雄少女心 2021-02-03 23:26

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

14条回答
  •  后悔当初
    2021-02-04 00:02

    I had the same problem, and for me the solution was purge, but with the (*) . Purge everything, so i did this:

    sudo apt-get purge mongo-tools*
    sudo apt-get purge mongodb*
    

    then i follow the steps from the documentation. (Actual version is 4.2.2), and the installation was in Ubuntu 18.04. (URL: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/)

    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
    

    With that four steps from the documentation i finally install mongodb community edition on Ubuntu. My problem was 3 files,that can't process.

    mongodb-org-server
    mongodb-org-mongos
    mongodb-org-tools
    

    I hope its help someone

提交回复
热议问题