我使用dnf / yum安装了mongodb,然后尝试运行该命令
mongo meteor --eval“printjson(db.getCollectionNames())
,但我收到以下错误:
MongoDB shell版本:3.2.8连接到:meteor 2017-03-17T14:09:56.787 + 0200 W NETWORK [thread1]无法连接到127.0.0.1:27017,原因:错误:111连接被拒绝2017-03-17T14: 09:56.787 + 0200 E QUERY [thread1]错误:无法连接到服务器127.0.0.1:27017,连接尝试失败:connect@src/mongo/shell/mongo.js:229:14 @(connect):1: 6 异常:连接失败
我搜索了一个解决方案,但我找不到任何对我有用的东西。 请帮我解决错误。 谢谢。
I installed mongodb using dnf/yum and I then tried running the command
mongo meteor --eval "printjson(db.getCollectionNames())
,but I get the following error:
MongoDB shell version: 3.2.8 connecting to: meteor 2017-03-17T14:09:56.787+0200 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused 2017-03-17T14:09:56.787+0200 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed : connect@src/mongo/shell/mongo.js:229:14 @(connect):1:6 exception: connect failed
I searched for a solution but I couldn't find anything that worked for me. Please help me resolve the error. Thanks.
最满意答案
所以首先我在Fedora 24上。
我找到了这个帖子https://www.learntutors.com/install-mongodb-fedora-24/
我改变以使事情有效的唯一方法是对以下内容的安装命令
dnf install - 允许mongodb-org mongodb-org-server
这样就可以删除fedora 24附带的mongodb软件包,有利于mongodb-org mongodb-org-server。 希望这有助于其他人。 干杯。
So first I am on fedora 24.
I found this thread https://www.learntutors.com/install-mongodb-fedora-24/
The only thing I changed to make things work is the install command to the following
dnf install --allowerasing mongodb-org mongodb-org-server
This was so the mongodb package that ships with fedora 24 could be erased in favor of mongodb-org mongodb-org-server. Hope this helps someone else. cheers.
更多推荐
发布评论