我試圖安裝和MongoDB本地啓動:的MongoDB沒有啓動的Ubuntu 14.04
我經過這些步驟(如歷史所示):
1819 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
1820 echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
1821 sudo apt-get update
1822 sudo apt-get install -y mongodb-org
1823 sudo service mongod start
,但我得到了下面的錯誤日誌中/var/log/mongodb/mongodb.log
2016-01-05T22:51:21.869+0000 I CONTROL [main] ***** SERVER RESTARTED *****
2016-01-05T22:51:21.874+0000 I CONTROL [initandlisten] MongoDB starting : pid=5394 port=27017 dbpath=/var/lib/mongodb 64-bit host=ip-172-31-45-129
2016-01-05T22:51:21.874+0000 I CONTROL [initandlisten] db version v3.2.0
2016-01-05T22:51:21.874+0000 I CONTROL [initandlisten] git version: 45d947729a0315accb6d4f15a6b06be6d9c19fe7
2016-01-05T22:51:21.874+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
2016-01-05T22:51:21.874+0000 I CONTROL [initandlisten] allocator: tcmalloc
2016-01-05T22:51:21.874+0000 I CONTROL [initandlisten] modules: none
2016-01-05T22:51:21.874+0000 I CONTROL [initandlisten] build environment:
2016-01-05T22:51:21.874+0000 I CONTROL [initandlisten] distmod: ubuntu1404
2016-01-05T22:51:21.874+0000 I CONTROL [initandlisten] distarch: x86_64
2016-01-05T22:51:21.874+0000 I CONTROL [initandlisten] target_arch: x86_64
2016-01-05T22:51:21.874+0000 I CONTROL [initandlisten] options: { config: "/etc/mongodb.conf", net: { bindIp: "127.0.0.1" }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongodb.log" } }
2016-01-05T22:51:21.895+0000 E NETWORK [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock errno:1 Operation not permitted
2016-01-05T22:51:21.895+0000 I - [initandlisten] Fatal Assertion 28578
2016-01-05T22:51:21.895+0000 I - [initandlisten]
***aborting after fassert() failure
我以前有一個安裝的mongodb後就正常了,但是不讓我連接到它,我要使用MongoDB的其他服務做了一些修改之後。所以我試圖刪除那個MongoDB的實例並嘗試重新安裝,之後我正面臨這個問題。
我也嘗試尋找文件:/tmp/mongodb-27017.sock
但它不存在於我的系統上。
我知道你說你找不到'.sock'文件,但我已經開始之前的MongoDB運行'須藤RM/tmp目錄/ MongoDB的-27017.sock'每次,也許試試這個? – tospig
我刪除了該文件,但後來遇到空間不足的問題。我正在編輯我的問題 – newenthusiast
我也有這個問題 - 必須更改數據存儲在conf文件中的路徑。類似[此博客文章](https://rohan-paul.github.io/mongodb_in_ubuntu/2015/09/03/How_to_Install_MongoDB_Iin_Ubuntu-15.04.html) – tospig