skip to Main Content

I am trying to install Mongo version 3.6 on CentOS, but the installation consistently fails with the following error:

`https://repo.mongodb.org/yum/redhat//mongodb-org/3.6/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
failure: repodata/repomd.xml from mongodb-org-3.6: [Errno 256] No more mirrors to try.
https://repo.mongodb.org/yum/redhat//mongodb-org/3.6/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found`

Here’s the content of the repo file that I am using. I have copied this from the MongoDB website:

`[mongodb-org-3.6]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat//mongodb-org/3.6/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc`

I have looked up on many forums, but I could not find a resolution to this issue. Could you help with the installation? Let me know what I am doing wrong?

3

Answers


  1. Change your url by indicating CentOS 7:

    https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.6/x86_64/
    
    Login or Signup to reply.
  2. wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.6/x86_64/RPMS/mongodb-org-server-3.6.17-1.el7.x86_64.rpm
    sudo rpm -i mongodb-org-server-3.6.17-1.el7.x86_64.rpm
    
    sudo systemctl start mongod
    

    ** EDIT **

    INSTALL ADDITIONAL COMPONENTS

    # SHELL
    wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.6/x86_64/RPMS/mongodb-org-shell-3.6.17-1.el7.x86_64.rpm
    sudo rpm -i mongodb-org-shell-3.6.17-1.el7.x86_64.rpm
    
    # MONGOS
    wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.6/x86_64/RPMS/mongodb-org-mongos-3.6.17-1.el7.x86_64.rpm
    sudo rpm -i mongodb-org-mongos-3.6.17-1.el7.x86_64.rpm
    
    # TOOLS
    wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.6/x86_64/RPMS/mongodb-org-tools-3.6.17-1.el7.x86_64.rpm
    sudo rpm -i mongodb-org-tools-3.6.17-1.el7.x86_64.rpm
    
    # REMAINING BITS
    wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.6/x86_64/RPMS/mongodb-org-3.6.17-1.el7.x86_64.rpm
    sudo rpm -i mongodb-org-3.6.17-1.el7.x86_64.rpm
    
    Login or Signup to reply.
    1. Create a /etc/yum.repos.d/mongodb-org-3.6.repo file so that you can install MongoDB directly using yum:

      Use the following repository file:

      [mongodb-org-3.6]
      name=MongoDB Repository
      baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.6/x86_64/
      gpgcheck=1
      enabled=1
      gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc
      
    2. Install the MongoDB packages with the following command:

      sudo yum install -y mongodb-org
      

      or

      sudo yum install -y mongodb-org-3.6.17 mongodb-org-server-3.6.17 mongodb-org-shell-3.6.17 mongodb-org-mongos-3.6.17 mongodb-org-tools-3.6.17
      
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search