'Failed to unlink socket file" error in MongoDB 3.0

后端 未结 8 1584
独厮守ぢ
独厮守ぢ 2020-11-28 05:14

I am new to MongoDB. I am trying to install MongoDb 3.0 on Ubuntu 13.0 LTS, which is a VM on Windows 7 Host. I have installed MongoDB successfully (packages etc.), but when

8条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 05:58

    Alternative to the answer provided by KurioZ7, you can simply set the permissions of the .sock file to the current user:

    sudo chown `whoami` /tmp/mongodb-27017.sock
    

    This does the trick for me if I want to run mongod without sudo. If I delete the file like in KurioZ7s answer, I will simply get the same error the next time I restart my machine.

提交回复
热议问题