I'm trying to install mongodb v3.4 guided by MongoDB.
First I create "/etc/yum.repo.d/mongodb.repo", then I paste this repo info in the file:

name=MongoDB Repository

and I try to install mongodb-org, but I get the following error from yum:

Loaded plugins: fastestmirror

| 3.6 kB  00:00:00     
| 3.4 kB  00:00:00     
https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.4/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.
To address this issue please refer to the below knowledge base article


If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/

 One of the configured repositories failed (MongoDB Repository),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

 1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=mongodb-org-3.4 ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable mongodb-org-3.4
        subscription-manager repos --disable=mongodb-org-3.4

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice

        yum-config-manager --save --setopt=mongodb-org-3.4.skip_if_unavailable=true

failure: repodata/repomd.xml from mongodb-org-3.4: [Errno 256] No more mirrors to try.
https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.4/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden

Is this error because of SELinux restrictions?  How should I allow yum to install mongodb?


This might be too late, but after running into the same issue, I followed a combination of Installing MongoDB via yum on AWS Linux fails: HTTPS Error 404 - Not Found (on Stack Overflow) with one of the responses to Yum error while installing MongoDB on CentOS? (not the selected one), so my steps were:

sudo rm -rf /etc/yum.repos.d/mongod*
sudo yum clean all

again create repo file

sudo vi /etc/yum.repos.d/mongodb-org-3.4.repo

paste the following (notice, I'm replacing '$releasever' with 7, for my system):

name=MongoDB Repository

then I ran this, and it was successful:

sudo yum install -y mongodb-org
  • you may not believe it but it's not too late :) thanks that works, and lesson learned. I guess there was a problem with repo, I may have had some typos in there – Brian SP2 Sep 26 '17 at 5:47
  • @Chris - How to start the mongod permanently with nohub? – Sayali Sep 5 '18 at 19:56

just found a way to install older version of mongoDB, not v3.4 though.

tried to write this info into "/etc/yum.repo.d/mongodb.repo":

name=MongoDB Repository

then yum started to install mongodb-org-2.6.12 by following command:

sudo yum install mongodb-org

again, it makes my application working but I may need newer version of mongoDB.
any help on installing v3.4?


The mongodb-repo did not work for me on CentOS 7. The baseurl doesn't seem to exist. I used

dnf install mongodb-server
dnf install mongodb

This installed version 3.4 on my machine. As it is provisioned via dnf, it should automatically pick up the updates going forward.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.