Unable to install mongodb properly on ubuntu 18.04 LTS

前端 未结 14 1352
盖世英雄少女心
盖世英雄少女心 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-03 23:51

    For me on Pop_OS Linux 20.04 LTS helped:

    1. $ sudo apt-get purge mongodb*

    Then creating /etc/apt/sources.list.d/mongodb-org-4.4.list file for Ubuntu 18.04 (Bionic) via this command:

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

    instead of Ubuntu 20.04 (Focal)

    After that install mongodb-org:

    1. $ sudo apt-get update
      $ sudo apt-get install -y mongodb-org

    And start mongodb service:

    1. $ sudo systemctl start mongod

提交回复
热议问题