Need help installing MongoDB 4+ on a Raspberry Pi 4

I’m trying to set up a staging environment on my Raspberry Pi for a NodeJS app that uses MongoDB for the database.

The issue is that the connector library for NodeJS requires a version of MongoDB more recent than what’s installed through a simple “apt-get install mongodb-server” (v2.4.14)

I’ve tried following tutorials such as this one, but I believe the problem is that it requires a 64-bit environment since I get this as a response:

E: Unable to locate package mongodb-org

So my question is, how can I upgrade my environment to 64-bit? I’ve tried editing the config.txt and now I get this for “uname -a”:

Linux DietPi4 5.10.11-v8+ #1399 SMP PREEMPT Thu Jan 28 12:14:03 GMT 2021 aarch64 GNU/Linux

Yet, it’s still unable to locate the mongodb-org package. Any advice?


changing config.txt will not switch your system from 32bit into 64bit. This is simply not possible. The only thing done, is to enable a 64bit kernel mode. However, userland will stay 32bit. To get a real 64bit system, you would need to perform a re-installation using a 64bit image. Since a while, a 64bit BETA version of Raspberry OS is available and supported by DietPi.

but it doesn’t matter because MongoDB is not supporting Debain for ARM64 systems

Might work under a docker

Thanks, Joulinar! Sorry about that. I’m still learning how kernels work. So I’ll have to do a full reinstall using a 64-bit OS if I want to attempt it again. Though, as you mentioned, it might not be supported at all.

I might also try Docker as WarHawk suggested. I’ve already put a lot of work in on setting things up, so I’d rather not wipe if possible.

well MongoDB would require a 64bit system, even if you use docker.

crap…this is the only supported for mongo-latest

bashbrew-architectures:amd64 arm64v8 s390x

Only way to get 64bit on RPi is to use their beta image…they are working on a stable release

as we support Raspberry OS 64bit, it can be downloaded from our side :slight_smile: