Error while installing mongodb on ubuntu 16.04

前端 未结 9 2978
小鲜肉
小鲜肉 2021-02-20 15:22

I\'ve already seen these answers, so please don\'t link em in solutions:

Installing MongoDB on Ubuntu 16.04 https://unix.stackexchange.com/questions/220

相关标签:
9条回答
  • 2021-02-20 15:34

    Have you checked inodes on the server? df -h may still show space left but you could be out of inodes. Please try running df -i and see if you have any inodes left on the server.

    0 讨论(0)
  • 2021-02-20 15:35

    Run the below command:

    sudo apt-get -f install

    And then try running sudo apt-get install -y mongodb-org

    0 讨论(0)
  • 2021-02-20 15:38

    Have you done the update?

    sudo apt-get update && sudo apt-get upgrade
    

    If the update does not help, try checking for broken dependencies:

    sudo apt-get check
    

    The check command is a diagnostic tool. It used to update package cache and checks for broken dependencies.

    I would also try two more things. First,

    sudo dpkg --configure -a
    sudo apt-get -f install
    

    and if that does not help, try to unblock the dpkg

    sudo rm -rf /var/lib/apt/lists/partial/*
    sudo apt-get -f install
    

    I hope it helps.

    0 讨论(0)
  • 2021-02-20 15:38
    • Download the MongoDB Community Server (.dbz) version

    • Extract it and move it to home directory

    • Edit the ~/.profile by running:

      • gedit ~/.profile
    • Then add this:

      • echo export PATH=mongodb-linux-x86_64-ubuntu1804-4.0.4/bin:$PATH
    • Save then update the system variables by running:

      • source ~/.profile
    • After that, start server by running:

      • mongod
    0 讨论(0)
  • 2021-02-20 15:49

    For installing mongodb 4.0 in ubuntu 16.04

    
    echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
    
    sudo apt install libcurl3
    
    sudo apt-get update
    
    sudo service mongod start
    
    mongo
    
    0 讨论(0)
  • 2021-02-20 15:53

    I have tried many answers, but at last, I found that make system version is not matched to the mongo repo required version. At MongoDB official website, there is an option to let you choose the correct repo link. So, check your system version firstly with:

    lsb_release -dc
    

    Then if your system version is 18.04, try

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

    If your system version is 16.04, try

    echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
    
    0 讨论(0)
提交回复
热议问题