How to install mongodb on endeavouros?

I’ve installed yay -S mongodb-bin… it installed successfully but not work! :neutral_face:
even, when I try to start mongo.service with sudo systemctl start mongodb it fails!
snapshot

I’ve searched a lot on google… everyone just suggest this way yay -S mongodb-bin.
I did the same way but not work for me!
how to properly install & configure mongodb?

Use mongosh instead mongo

https://wiki.archlinux.org/title/MongoDB

2 Likes

image

image

It would be preferable to post the terminal output as text and not as screenshot.
That way, it would be easier to copy, paste, quote and it will be searchable by forum’s search function and other search engines.

Open a terminal in full size. Run your command. Copy and paste the output as text, highlight it and press Ctrl-E to format for better readability.

:enos_flag:

muhammadabir  ~  mongosh
Current Mongosh Log ID:	62f9f79ef95ddd4265c8f030
Connecting to:		mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.5.4
MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017

muhammadabir  ~  1  sudo systemctl status mongodb
[sudo] password for muhammadabir: 
× mongodb.service - MongoDB Database Server
     Loaded: loaded (/usr/lib/systemd/system/mongodb.service; disabled; preset: disabled)
     Active: failed (Result: core-dump) since Mon 2022-08-15 13:26:17 +06; 10min ago
   Duration: 482ms
       Docs: https://docs.mongodb.org/manual
   Main PID: 392364 (code=dumped, signal=ILL)
        CPU: 21ms

Aug 15 13:26:16 muhammadabir-pc systemd[1]: Started MongoDB Database Server.
Aug 15 13:26:17 muhammadabir-pc systemd[1]: mongodb.service: Main process exited, code=dumped, status=4/ILL
Aug 15 13:26:17 muhammadabir-pc systemd[1]: mongodb.service: Failed with result 'core-dump'.

1 Like

I am not using mongodb so I might not be able to be of much help to you.

However, you might want to examine the coredump and see if it will give you some clues on what might be wrong.

https://wiki.archlinux.org/title/Core_dump

1 Like

Could be down to your using the -bin package. Try the standard mongodb package instead.

But also, there’s a section on “MongoDB doesn’t start” on the wiki page already linked.

1 Like

People in the comments of mongodb-bin AUR page complain that Mongo 5 does not work on older processors, hence core dumps. You might also try an older version of Mongo like mongodb44-bin.

2 Likes

That might not be a problem if it’s compiled from source using an older CPU, as the compiler will use the correct instructions for the CPU. However, if the MongoDB developers have used microarchitecture-specific instructions (e.g. anything part of SSE4.2) then the only option is to use an older version of the software.