I am attempting to install MongoDB on CentOS 6.5. I believe I am following the instructions precisely step-by-step, but continue to get the error No package mongodb-org available after issuing the command sudo yum install -y mongodb-org.
Following the instructions here:
http://docs.mongodb.org/master/tutorial/install-mongodb-on-red-hat/?_ga=1.140464624.273085478.1441642123
[vagrant@localhost lounge]$ sudo yum install -y mongodb-org
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.host-engine.com
* epel: ftp.osuosl.org
* extras: ftp.osuosl.org
* remi-safe: mirrors.mediatemple.net
* updates: mirror.solarvps.com
No package mongodb-org available.
Error: Nothing to do
I'm looking at the instructions for RHEL 6, and this is what I have (am I using the correct instructions?):
[vagrant@localhost yum.repos.d]$ cat /proc/version
Linux version 2.6.32-431.el6.i686 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Fri Nov 22 00:26:36 UTC 2013
Likewise, the command yum search mongodb-org says No matches found.
Here is my repo file as the instructions said to create:
[vagrant@localhost yum.repos.d]$ cat mongodb-org-3.0.repo
[mongodb-org-3.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.0/x86_64/
gpgcheck=0
enabled=1
[vagrant@localhost yum.repos.d]$
Permanent Workaround
I upgraded the OS from CentOS 6.5 to Centos 7, followed subtly different instructions:
The repo file is the same, but for whatever reason CentOS 7 procedures worked without a hitch.
Note: I don't think this is an answer, just a workaround, so if someone can say why the 6.5 procedures didn't work, that would be the actual answer.
Best Answer
I think you try to add
exclude
directory from/etc/yum.conf
to prevent future updates for example:But above line need to be added after perform install mongodb-org: