Need help installing MongoDB 4+ on a Raspberry Pi 4

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
MontRayJak
Posts: 2
Joined: Sat Feb 27, 2021 10:15 pm

Need help installing MongoDB 4+ on a Raspberry Pi 4

Post by MontRayJak »

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:

Code: Select all

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":

Code: Select all

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?
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Need help installing MongoDB 4+ on a Raspberry Pi 4

Post by Joulinar »

Hi,

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 https://docs.mongodb.com/manual/adminis ... tes/#arm64
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
WarHawk
Posts: 725
Joined: Thu Jul 20, 2017 8:55 am

Re: Need help installing MongoDB 4+ on a Raspberry Pi 4

Post by WarHawk »

Might work under a docker

https://hub.docker.com/_/mongo/
MontRayJak
Posts: 2
Joined: Sat Feb 27, 2021 10:15 pm

Re: Need help installing MongoDB 4+ on a Raspberry Pi 4

Post by MontRayJak »

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.
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Need help installing MongoDB 4+ on a Raspberry Pi 4

Post by Joulinar »

well MongoDB would require a 64bit system, even if you use docker.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
WarHawk
Posts: 725
Joined: Thu Jul 20, 2017 8:55 am

Re: Need help installing MongoDB 4+ on a Raspberry Pi 4

Post by WarHawk »

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
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Need help installing MongoDB 4+ on a Raspberry Pi 4

Post by Joulinar »

as we support Raspberry OS 64bit, it can be downloaded from our side :)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply