0

I am attempting to install MongoDB on my RedHat 8 | AWS EC2 instance ...

/etc/yum.repos.d/mongodb-org-4.0.repo

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

Then ... yum repolist

MongoDB Repository                                                                                                                                                                 366  B/s | 390  B     00:01
Error: Failed to synchronize cache for repo 'mongodb-org-4.0'

...

Possibly RHEL 8 being a new release is causing issues?

  • Check these things 1. your server able to communicate to repo(check for others too). 2. if url given in repo is correct and having correct information. 3. try to clean repo and retry like sudo dnf clean all sudo dnf rm -r /var/cache/dnf sudo dnf upgrade – asktyagi Jun 15 at 14:55
1

Many, many things built for RHEL also require EPEL, but EPEL 8 is not yet available.

One of those things is mock, a package which orchestrates building RPM packages for distribution, which is itself in EPEL, and which doesn't yet have a usable configuration for RHEL 8.

It is probably going to be several months before this is resolved, and EPEL and mock are available. In the meantime you should deploy on RHEL 7.

0

Some other possible reasons may be, url is wrong or repo url is not for RHEL8 at all. If that is not the case try to clean the yum cache(may be corrupted).

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.