0

when I execute: ./mongod --dbpath=/usr/local/data/mongo_data the result is :Segmentation fault (core dumped) hope someone help me,thanks!

4
  • Did you try calling mongod directly? mongod --dbpath=/usr/local/data/mongo_data Commented Nov 22, 2018 at 6:38
  • you mean mongod --dbpath=/usr/local/data/mongo_data?yes ,i tried ,but i didnt work, but i try to execute: ./bin/ mongod --dbpath=/usr/local/data/mongo_data,it works,do you know why?i use the ubuntu 18.10,but thank you so much for my first question,how do i follow you? Commented Nov 22, 2018 at 7:05
  • I tried your code by installing mongodb server on my ububtu 18 and the code worked. If you just started, I recommend to uninstall the current version and reinstall the mongodb server. Just a suggestion. 🙂 Commented Nov 22, 2018 at 7:20
  • 1
    ok, thank you, you are a really nice person. Commented Nov 22, 2018 at 7:28

1 Answer 1

0

@zhaoyongxin this steps will guide you uninstall apt-get remove or purge command from terminals

1) navigate to the mongodb folder that has been downloaded for mongodb site
eg cd mongodb/bin/ 

2) create folder name mongodb-data or any other name like mkdir mongodb-data  

3) ./mongod --dbpath ~/mongodb-data/

./mongod will store all your schema in your mongodb-data

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.