Install MongoDB on Manjaro

Henry Harutyunyan picture Henry Harutyunyan · Dec 23, 2019 · Viewed 13.8k times · Source

I'm facing difficulties installing the MongoDB community server on Manjaro Linux.

There isn't official documentation on how to install it on Arch-based systems and Pacman can't find it in the AUR repos.

Has anyone ever tried to install it?

Answer

Henry Harutyunyan picture Henry Harutyunyan · Dec 23, 2019

Here is what I did to install.

As the package is not available in the official Arch repositories and can't be installed using pacman, you need to follow a few steps to install it.

First, you need to get the URL for the repo of prebuilt binaries from AUR. It can be found here and by the time of writing this it was https://aur.archlinux.org/mongodb-bin.git

Simply clone the repo in your home directory or anywhere else. Do git clone https://aur.archlinux.org/mongodb-bin.git, then head to the cloned directory, cd mongodb-bin.

Now, all you need to do is to run makepkg -si command to make the package. the -s flag will handle the dependencies for you and the -i flag will install the package.

After makepkg finishes its execution, don't forget to start mongodb.service. Run systemctl start mongodb and if needed enable it with systemctl enable mongodb.

Type mongo in the terminal and if the Mongo Shell runs you are all set.


Later edit (8.2.2021): This package is now available in AUR.