0

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:

http://docs.mongodb.org/master/tutorial/install-mongodb-on-red-hat/?_ga=1.169228258.273085478.1441642123

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.

3
  • What's the output of yum list – Wesley Sep 7 '15 at 19:30
  • mongodb.i686 2.4.14-1.el6 – David Sep 7 '15 at 20:14
  • 3
    You may as well stick with CentOS 7. There's little good reason to start a new project on 6. – Michael Hampton Sep 7 '15 at 22:13
1

I think you try to add exclude directory from /etc/yum.conf to prevent future updates for example:

exclude=mongodb-org,mongodb-org-server,mongodb-org-shell,mongodb-org-mongos,mongodb-org-tools

But above line need to be added after perform install mongodb-org:

sudo yum install -y mongodb-org
0

It seems that packages for Centos 6.5 are missing in this tree. Can you use this URL instead: http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/

(From this page)

8
  • I noticed the tag at the top of the repo in your link is [mongodb]. Is the the same as [mongodb-org]? I had the impression they were different packages. – David Sep 7 '15 at 20:18
  • Hey David, looking at the RPMs, the package "mongodb-org" is present: downloads-distro.mongodb.org/repo/redhat/os/x86_64/RPMS – Razique Sep 7 '15 at 20:26
  • This is very helpful, but I have to admit, I'm quite a newbie, easily confused. Now it looks like the packages downloaded, but after that, a message still says "No packages Mongo-db.org available". Is there something else I need to change in the repo settings or the install command? – David Sep 7 '15 at 20:49
  • Can you try to install the package "mongodb-org" instead? – Razique Sep 7 '15 at 21:19
  • I see it download mongodb and mongodb/primary, then it says "No package mongodb.org available" Since I'm so new at all this, I don't know if it's the OS or something I'm overlooking. – David Sep 7 '15 at 21:30
0

For the sake of completeness:

As already pointed out there is no official MongoDB package available for RHEL or CentOS in the official standard repositories. But RedHat makes official supported MongoDB packages available over software collections RHSCL.

RHSCL releases occur annually. The collections have a two to three year support life cycle to allow rapid innovation without sacrificing stability. RHSCL is available with select Red Hat Enterprise Linux subscriptions for the currently supported releases of Red Hat Enterprise Linux including 6 and 7.

So, if you use RHEL because you need an Linux distribution with enterprise support you should consider using the packages made available via RHSCL.

RHSCL like software collections are available for CentOS as well. In case you use CentOS in a VM to simulate production RHEL systems.

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.