Not able to install MongoDB on redhat

sudo yum install -y mongodb-org
MongoDB Repository 869 B/s | 392 B 00:00
Errors during downloading metadata for repository ‘mongodb-org-5.0’:

1 Like

Ha, it appears the docs may be wrong (@Stennie_X ??) because the repo doesn’t match on the $releasever expansion.

In your repo file, change the URL to https://repo.mongodb.org/yum/redhat/8Server/mongodb-org/5.0/x86_64/repodata/repomd.xml … note the 8Server in place of the $releasever expansion to 8.2.

Welcome to the MongoDB Community @Ashish_Wanjare !

Can you confirm the specific distro & version of Red Hat you are running?

The docs should be correct for Red Hat Enterprise Linux Server, but $releasever may vary if you happen to be using a variant like RedHat Enterprise Linux Workstation.

A workaround would be to hardcode the version as @Jack_Woehr suggested, but if you can share more details there may be a documentation improvement needed as well.

Thanks,
Stennie

Yes thanks both of you @Jack_Woehr @Stennie_X
It’s work & now able to install MongoDB community edition on RedHat 8.2

1 Like