Eu tenho um servidor com o CentOS 7, gostaria de instalar o mongoDB. Eu tentei instalá-lo digitando:
sudo yum install mongodb
sem problemas, então eu faço mongod
:
-bash: mongod: command not found
Se eu fizer apenas mongo
, obtenho:
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
Então, tentei instalá-lo novamente seguindo instruções , mas depois quando eu digito sudo yum install -y mongodb-org
eu recebo:
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
E isso está me deixando louco. Eu li que fazer yum makecache
e instalar novamente resolveria o meu problema, mas isso não aconteceu. Também tentei desinstalar tudo com sudo yum erase $(rpm -qa | grep mongodb-org)
, mas depois recebi:
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
Então, o que mais eu posso fazer? Eu só preciso de mongo correndo. Obrigado!