Install MongoDB on Raspberry Pi

[64-bit Raspberry OS Buster]

We are going to use instructions for Ubuntu 64-bit:

ADDED OPTION -L to support re-direct… (May, 7, 2022)

curl -s -L https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb [ arch=arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt update

Now we can install MongoDB server:

sudo apt install mongodb-org

# enable and start
sudo systemctl enable mongod
sudo systemctl start mongod

(more…)

MongoDB + Python

Depends on the version you are using:

python -m pip install pymongo
python3 -m pip install pymongo

In my case, because I’ve change the default version of Python,

python -m pip install pymongo

will be installed for python3

Yandex.Metrica