Konflikt bei der Installation von MongoDB

1633
Sredny M Casanova

Ich habe einen Server mit CentOS 7, ich möchte mongoDB installieren. Ich habe versucht, es zu installieren:

sudo yum install mongodb 

ohne probleme mongodbekomme ich dann:

-bash: mongod: command not found 

Wenn ich nur mongobekomme ich:

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 

Also habe ich versucht, es nach dieser Anleitung erneut zu installieren, aber wenn ich tippe, sudo yum install -y mongodb-orgbekomme ich:

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 

Und es macht mich verrückt. Ich habe gelesen, dass das Durchführen yum makecacheund erneute Installieren mein Problem lösen würde, aber es nicht tat. sudo yum erase $(rpm -qa | grep mongodb-org)Ich habe auch versucht, alles mit zu deinstallieren, aber dann bekomme ich:

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 

Was kann ich sonst noch tun? Ich brauche nur Mongo zum Laufen. Vielen Dank!

1

1 Antwort auf die Frage

0
Deeh

Sie haben mongodb-2.6.12-4.el7.x86_64installiert (höchstwahrscheinlich vom EPEL-Repo - ich vermute nur, wie Sie es nicht angegeben haben) und versuchen, eine andere Version des MongoDB-Repos zu installieren.

Versuche Folgendes:

yum remove mongodb* yum clean all yum install mongodb-org 

Verwenden Sie nicht -ymit yum. Nehmen Sie sich Zeit, um zu lesen, was auf dem Bildschirm angezeigt wird, insbesondere wenn es für Sie neu ist.