how to install mongodb raspberry 4 last working version

por | 10 marzo, 2023

If you’re planning to run MongoDB 5.0 on your Raspberry Pi 4, you might run into an issue where the main process exits with a «code=killed, status=4/ILL» error. The error message suggests that the CPU microarchitecture of Raspberry Pi 4 is not compatible with MongoDB 5.0 binary packages, which you can verify on the MongoDB website and forum.

Unfortunately, this means that the last supported version of MongoDB on Raspberry Pi 4 is 4.4.18.

I personally encountered this issue and decided to document my experience in this blog post, hoping that it might save some of you time and frustration.

As an alternative, you could try building MongoDB from source and see if that works, but keep in mind that it can be a complicated and time-consuming process.

** Last mongodb working version for RPI4 is 4.4.18 **

raspian version (ubuntu 20.04 works also)

cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

1st add the gpg and repository:

wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list

2dn install version 4.4.18 and hold (don’t ever update to version 4.4.19 )

sudo apt-get install mongodb-org-mongos=4.4.18 mongodb-org-tools=4.4.18 mongodb-org-shell=4.4.18 mongodb-org-database-tools-extra=4.4.18 mongodb-org=4.4.18 mongodb-org-server=4.4.18
 
sudo apt-mark hold mongodb-org-mongos mongodb-org-tools mongodb-org-shell mongodb-org-database-tools-extra mongodb-org mongodb-org-server

your welcome 😉