1

我已经在 Fedora 17 上安装了 mongoDB,但服务器没有运行。

我在这篇文章MongoDB service not running in Fedora中遇到了同样的错误, 然后尝试放松这条指令,我又遇到了另一个错误

试图做到这一点

 yum --disablerepo=* --enablerepo=fedora,updates install mongodb mongodb-server 

I got this Error
    Transaction Check Error:
  file /usr/bin/bsondump from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with       file from package mongo-10gen-2.0.6-mongodb_1.x86_64

  file /usr/bin/mongo from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64

  file /usr/bin/mongodump from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64

  file /usr/bin/mongoexport from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64

  file /usr/bin/mongofiles from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64

  file /usr/bin/mongoimport from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64

来自安装 mongodb-2.0.2-10.fc17.x86_64 的文件 /usr/bin/mongorestore 与来自包 mongo-10gen-2.0.6-mongodb_1.x86_64 的文件冲突

  file /usr/bin/mongostat from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64

  file /usr/bin/mongotop from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64

来自安装 mongodb-server-2.0.2-10.fc17.x86_64 的文件 /etc/sysconfig/mongod 与来自包 mongo-10gen-server-2.0.6-mongodb_1.x86_64 的文件冲突

  file /usr/bin/mongod from install of mongodb-server-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-server-2.0.6-mongodb_1.x86_64

  file /usr/bin/mongos from install of mongodb-server-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-server-2.0.6-mongodb_1.x86_64

错误摘要

4

1 回答 1

1

看起来您已经为 MongoDB 2.0.6 安装了10gen 包。冲突是由于尝试安装默认的 Fedora 打包版本的 MongoDB(错误消息中的 2.0.2)引起的,该版本包含同名的二进制文件。

您应该能够以root 身份或使用 sudo启动 MongoDB 服务,而不是重新安装:

service mongod start

使用 10gen 打包安装,您应该会发现:

  • /etc/mongod.conf用于更改配置选项
  • 默认数据目录:/var/lib/mongo
  • 默认日志文件目录:/var/log/mongo
  • 初始化脚本位于:/etc/rc.d/init.d/mongod
于 2012-07-22T08:57:43.090 回答