Conflit lors de l'installation de MongoDB

J'ai un serveur avec CentOS 7, je voudrais installer MongoDB. J'ai essayé de l'installer en tapant:

sudo yum install mongodb

Sans problème, alors je fais mongod J'obtiens:

-bash: mongod: command not found

Si je ne fais que mongo j'obtiens :

2017-04-22T21:09:55.078+0000 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2017-04-22T21:09:55.079+0000 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146

Donc, j'ai essayé de l'installer à nouveau en suivant ces instructions mais quand je tape sudo yum install -y mongodb-org j'obtiens:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.mirror.constant.com
 * epel: mirror.math.princeton.edu
 * extras: mirror.netdepot.com
 * updates: mirror.cc.columbia.edu
Resolving Dependencies
--> Running transaction check
---> Package mongodb-org.x86_64 0:3.4.4-1.el7 will be installed
--> Processing Dependency: mongodb-org-tools = 3.4.4 for package: mongodb-org-3.4.4-1.el7.x86_64
--> Processing Dependency: mongodb-org-shell = 3.4.4 for package: mongodb-org-3.4.4-1.el7.x86_64
--> Processing Dependency: mongodb-org-server = 3.4.4 for package: mongodb-org-3.4.4-1.el7.x86_64
--> Processing Dependency: mongodb-org-mongos = 3.4.4 for package: mongodb-org-3.4.4-1.el7.x86_64
--> Running transaction check
---> Package mongodb-org-mongos.x86_64 0:3.4.4-1.el7 will be installed
---> Package mongodb-org-server.x86_64 0:3.4.4-1.el7 will be installed
---> Package mongodb-org-shell.x86_64 0:3.4.4-1.el7 will be installed
---> Package mongodb-org-tools.x86_64 0:3.4.4-1.el7 will be installed
--> Processing Conflict: mongodb-org-server-3.4.4-1.el7.x86_64 conflicts mongodb
--> Processing Conflict: mongodb-org-3.4.4-1.el7.x86_64 conflicts mongodb
--> Processing Conflict: mongodb-org-shell-3.4.4-1.el7.x86_64 conflicts mongodb
--> Processing Conflict: mongodb-org-mongos-3.4.4-1.el7.x86_64 conflicts mongodb
--> Processing Conflict: mongodb-org-tools-3.4.4-1.el7.x86_64 conflicts mongodb
--> Finished Dependency Resolution
Error: mongodb-org-mongos conflicts with mongodb-2.6.12-4.el7.x86_64
Error: mongodb-org-shell conflicts with mongodb-2.6.12-4.el7.x86_64
Error: mongodb-org-tools conflicts with mongodb-2.6.12-4.el7.x86_64
Error: mongodb-org conflicts with mongodb-2.6.12-4.el7.x86_64
Error: mongodb-org-server conflicts with mongodb-2.6.12-4.el7.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Et ça me rend fou. J'ai lu que faire yum makecache et l'installer à nouveau résoudrait mon problème, mais ce n'est pas le cas. Aussi j'ai essayé de tout désinstaller avec sudo yum erase $(rpm -qa | grep mongodb-org) mais ensuite j'obtiens:

Loaded plugins: fastestmirror
Error: Need to pass a list of pkgs to erase
 Mini usage:

erase PACKAGE...

Remove a package or packages from your system

aliases: remove, autoremove, erase-n, erase-na, erase-nevra, autoremove-n, autoremove-na, autoremove-nevra, remove-n, remove-na, remove-nevra

Alors, que puis-je faire d'autre? J'ai juste besoin de mongo qui court. Merci!

demandé sur