No package mongodb-org available. [How to Solve]

Try to install mongodb (Yum install mongodb ORG) on CentOS 6.7, and the problem of no package mongodb org available appears. This paper gives the solution to the problem, and successfully installs mongodb

Questions

Using Yum install mongodb org command to install mongodb, the problem of no package mongodb org available. appears. The details are as follows:

[[email protected] ~]#  yum install mongodb-org
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
No package mongodb-org available.
Error: Nothing to do

Solutions

The reason for this problem is the lack of available mongodb org packages

No package mongodb-org available.)。

solution:

Create a mongodb.repo file in the/etc/yum.repos.d/ directory and specify the mongodb resource library

Use the VIM/etc/yum. Repos. D/mongodb. Repo command to create and open the file mongodb. Repo

[[email protected] etc]# vim /etc/yum.repos.d/mongodb.repo

In the mongodb.repo file, add mongodb resources. The Mongo org version obtained here is the latest version 3.4. For example:

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

Installation

After configuring mongodb related information, use Yum install mongodb org again to install mongodb org

[[email protected] etc]# yum install mongodb-org
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
mongodb-org-3.4                                                                                                                                                                                                                                        | 2.5 kB     00:00     
mongodb-org-3.4/primary_db                                                                                                                                                                                                                             |  18 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package mongodb-org.x86_64 0:3.4.2-1.el6 will be installed
--> Processing Dependency: mongodb-org-tools = 3.4.2 for package: mongodb-org-3.4.2-1.el6.x86_64
--> Processing Dependency: mongodb-org-shell = 3.4.2 for package: mongodb-org-3.4.2-1.el6.x86_64
--> Processing Dependency: mongodb-org-server = 3.4.2 for package: mongodb-org-3.4.2-1.el6.x86_64
--> Processing Dependency: mongodb-org-mongos = 3.4.2 for package: mongodb-org-3.4.2-1.el6.x86_64
--> Running transaction check
---> Package mongodb-org-mongos.x86_64 0:3.4.2-1.el6 will be installed
---> Package mongodb-org-server.x86_64 0:3.4.2-1.el6 will be installed
---> Package mongodb-org-shell.x86_64 0:3.4.2-1.el6 will be installed
---> Package mongodb-org-tools.x86_64 0:3.4.2-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================================================
 Package                                                                Arch                                                       Version                                                          Repository                                                           Size
==============================================================================================================================================================================================================================================================================
Installing:
 mongodb-org                                                            x86_64                                                     3.4.2-1.el6                                                      mongodb-org-3.4                                                     5.8 k
Installing for dependencies:
 mongodb-org-mongos                                                     x86_64                                                     3.4.2-1.el6                                                      mongodb-org-3.4                                                      12 M
 mongodb-org-server                                                     x86_64                                                     3.4.2-1.el6                                                      mongodb-org-3.4                                                      20 M
 mongodb-org-shell                                                      x86_64                                                     3.4.2-1.el6                                                      mongodb-org-3.4                                                      11 M
 mongodb-org-tools                                                      x86_64                                                     3.4.2-1.el6                                                      mongodb-org-3.4                                                      49 M

Transaction Summary
==============================================================================================================================================================================================================================================================================
Install       5 Package(s)

Total download size: 91 M
Installed size: 257 M
Is this ok [y/N]: 

select y

Is this ok [y/N]: y
Downloading Packages:
(1/5): mongodb-org-3.4.2-1.el6.x86_64.rpm                                                                                                                                                                                                              | 5.8 kB     00:00     
(2/5): mongodb-org-mongos-3.4.2-1.el6.x86_64.rpm                                                                                                                                                                                                       |  12 MB     00:01     
(3/5): mongodb-org-server-3.4.2-1.el6.x86_64.rpm                                                                                                                                                                                                       |  20 MB     00:00     
(4/5): mongodb-org-shell-3.4.2-1.el6.x86_64.rpm                                                                                                                                                                                                        |  11 MB     00:00     
(5/5): mongodb-org-tools-3.4.2-1.el6.x86_64.rpm                                                                                                                                                                                                        |  49 MB     00:01     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                          15 MB/s |  91 MB     00:06     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID a15703c6: NOKEY
Retrieving key from https://www.mongodb.org/static/pgp/server-3.4.asc
Importing GPG key 0xA15703C6:
 Userid: "MongoDB 3.4 Release Signing Key <[email protected]>"
 From  : https://www.mongodb.org/static/pgp/server-3.4.asc
Is this ok [y/N]: 

select y

Is this ok [y/N]: y
Downloading Packages:
(1/5): mongodb-org-3.4.2-1.el6.x86_64.rpm                                                                                                                                                                                                              | 5.8 kB     00:00     
(2/5): mongodb-org-mongos-3.4.2-1.el6.x86_64.rpm                                                                                                                                                                                                       |  12 MB     00:01     
(3/5): mongodb-org-server-3.4.2-1.el6.x86_64.rpm                                                                                                                                                                                                       |  20 MB     00:00     
(4/5): mongodb-org-shell-3.4.2-1.el6.x86_64.rpm                                                                                                                                                                                                        |  11 MB     00:00     
(5/5): mongodb-org-tools-3.4.2-1.el6.x86_64.rpm                                                                                                                                                                                                        |  49 MB     00:01     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                          15 MB/s |  91 MB     00:06     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID a15703c6: NOKEY
Retrieving key from https://www.mongodb.org/static/pgp/server-3.4.asc
Importing GPG key 0xA15703C6:
 Userid: "MongoDB 3.4 Release Signing Key <[email protected]>"
 From  : https://www.mongodb.org/static/pgp/server-3.4.asc
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : mongodb-org-server-3.4.2-1.el6.x86_64                                                                                                                                                                                                                      1/5 
  Installing : mongodb-org-shell-3.4.2-1.el6.x86_64                                                                                                                                                                                                                       2/5 
  Installing : mongodb-org-mongos-3.4.2-1.el6.x86_64                                                                                                                                                                                                                      3/5 
  Installing : mongodb-org-tools-3.4.2-1.el6.x86_64                                                                                                                                                                                                                       4/5 
  Installing : mongodb-org-3.4.2-1.el6.x86_64                                                                                                                                                                                                                             5/5 
  Verifying  : mongodb-org-tools-3.4.2-1.el6.x86_64                                                                                                                                                                                                                       1/5 
  Verifying  : mongodb-org-mongos-3.4.2-1.el6.x86_64                                                                                                                                                                                                                      2/5 
  Verifying  : mongodb-org-shell-3.4.2-1.el6.x86_64                                                                                                                                                                                                                       3/5 
  Verifying  : mongodb-org-3.4.2-1.el6.x86_64                                                                                                                                                                                                                             4/5 
  Verifying  : mongodb-org-server-3.4.2-1.el6.x86_64                                                                                                                                                                                                                      5/5 

Installed:
  mongodb-org.x86_64 0:3.4.2-1.el6                                                                                                                                                                                                                                            

Dependency Installed:
  mongodb-org-mongos.x86_64 0:3.4.2-1.el6                            mongodb-org-server.x86_64 0:3.4.2-1.el6                            mongodb-org-shell.x86_64 0:3.4.2-1.el6                            mongodb-org-tools.x86_64 0:3.4.2-1.el6                           

Complete!
[[email protected] etc]# 

Now Mongo org 3.4 is installed

Start up

Use the service mongod start command to start Mongo service

[[email protected] ~]# service mongod start
Starting mongod:                                           [  OK  ]
[[email protected] ~]# 

In general, you can successfully install and start the Mongo service, and you can start the journey of Mongo

However, it is possible that Mongo has been installed and deleted before. When using the service mongod start command to start, you may encounter the following problems:

Error starting mongod. /var/run/mongodb/mongod.pid exists.

[[email protected] srv]# service mongod start
Error starting mongod. /var/run/mongodb/mongod.pid exists.
[[email protected] srv]# 

Use the command vim /var/log/mongodb/mongod.log to view the logs that

Failed to unlink socket file /tmp/mongodb-27017.sock Operation not permitted

Detailed screenshots are as follows:

problem solving:

This problem is mainly the problem of permissions. Use the following command to authorize and restart

chown mongod:mongod /tmp/mongodb-27017.sock

chown mongod:mongod /tmp/mongodb-27017.sock
[[email protected] ~]# chown mongod:mongod /tmp/mongodb-27017.sock
[[email protected] ~]# service mongod start
Starting mongod:                                           [  OK  ]
[[email protected] ~]# 

Similar Posts: