The main operating system for Raspberry Pi, Raspbian, continues to evolve. The latest version as of August 2017 is “Raspbian Stretch” — based upon the current stable version of Debian 9. The previous version was known as “Raspbian Jessie”. One difference between versions is OpenSSL libraries. OpenSSL is a general purpose cryptography library that provides an open source implementation of the Secure Sockets Layer (SSL). My previous builds of MongoDB relied on the older library. As a result, my previous binaries for 3.0.14 and 3.0.9 do not run under Raspbian Stretch. Given this change as well as other changes to MongoDB source and newer compilers, I could no longer compile MongoDB 3.0.14 with SSL.
After a few source tweaks and use of various compiler flags, I have manged to compile MongoDB core apps and tools. These binaries do NOT support SSL and only run under Raspian Stretch on a Raspberry Pi 3. [UPDATE — 2018 Mar 22] I have confirmed that these binaries work on the latest Raspberry Pi 3 Model B+ with the March 2018 version of Raspbian.
You can download a zipped file of the MongoDB core binaries v3.0.14 for Raspbian Stretch from here.
md5sum: a09b9455aa265cac07feeaaaed01a610 – mongodb_stretch_3_0_14_core.zip
contains:
- mongo
- mongod
- mongos
You can download a zipped file of the MongoDB tools v3.0.14 for Raspbian Stretch from here.
md5sum: fc44e519e58f369d280fb0e000643893 – mongodb_stretch_3_0_14_tools.zip
contains:
- bsondump
- mongoexport
- mongoimport
- mongorestore
- mongotop
- mongodump
- mongofiles
- mongooplog
- mongostat
Installation and use instructions can be found in my previous blog entry: MongoDB 3.0.9 binaries for Raspberry Pi
Pingback: MongoDB 3.0.14 binaries for Raspberry Pi 3
Pingback: MongoDB 3.0.9 binaries for Raspberry Pi 2 & 3 (Jessie)
Hey – Thanks for the binaries! I’ve created a Docker image for easier set up. Check it out: https://github.com/andresvidal/rpi3-mongodb3 or https://hub.docker.com/r/andresvidal/rpi3-mongodb3/
docker run -d \
–name rpi3-mongodb3 \
–restart unless-stopped \
-v /data/db:/data/db \
-v /data/configdb:/data/configdb \
-p 27017:27017 \
-p 28017:28017 \
andresvidal/rpi3-mongodb3:latest
Hey, Excellent work on the binaries! I tried to get them working on my rapbian stretch with RPI3 but when I try to run mongod it still asks for libssl.so.1.0.0 and libcrypto.so.1.0.0 (error while loading shared libraries). Any recommendations ?
It seems you might be using the wrong “mongod” binary? Ensure you have downloaded the Stretch version of MongoDB core binaries from: http://andyfelong.com/downloads/mongodb_stretch_3_0_14_core.zip Also, make sure you have latest Stretch version of Raspbian (Version: November 2017, Release Date: 2017-11-29). For me, “cat /etc/os-release” shows “PRETTY_NAME=Raspbian GNU/Linux 9 (stretch)”
Thank you very much. I solved the problem of using MongoDBR in Raspberry Pi 3B
Pingback: MongoDB 3.0.14 binaries for Raspberry Pi 3
Hi !
Thanks a lot for this work. It saves my life for a project on my R-py 3B+ with Raspbian Stretch lite.
It works at first try.
Hi Andy,
The fact that I can run Mongodb 3 on my Raspberry PI 2B is fantastic, thanks a lot for your efforts!
I’m using it with a piece of software that inserts a few thousands records (∼20k), at the beginning it wa running smoothly, until at a certain point I hit a road block:
2018-07-16T15:50:36.308+0100 I NETWORK [initandlisten] connection accepted from 127.0.0.1:48870 #5 (4 connections now open)
2018-07-16T15:50:36.334+0100 F – [conn4] Invalid access at address: 0x5d66ddf7
2018-07-16T15:50:36.542+0100 F – [conn4] Got signal: 7 (Bus error).
Now every time the software tries to continue, the mongo server crashes with this error.
After a short googling I found this answer:
https://stackoverflow.com/questions/16746134/bus-error-on-mongodb-mongoclient-connect-for-raspberry-pi-arm
Do you think it could be the issue? If the RAM wouldn’t have been enough, it’d have shown a different error if I’m not mistaken.
Thanks!
I believe I did build with “correct” ARM setting(s). Perhaps you are running out of RAM. I suggest a quick test by adding a swap file to see if this “fixes” the issue. Make sure you have at least 1GB free on your SD Card. Make a swapfile:
sudo dd if=/dev/zero of=/mnt/swapfile bs=1024 count=1000000
sudo chmod 600 /mnt/swapfile
sudo mkswap /mnt/swapfile
sudo swapon /mnt/swapfile
and restart mongod
LMK how it goes…
Great work but I am getting an error when I try and do a text search the error is got signal: 7 (bus error) this post on SE points to a solution when compiling https://stackoverflow.com/questions/16746134/bus-error-on-mongodb-mongoclient-connect-for-raspberry-pi-arm
Ignore my previous question..I was running stretch and didn’t realize it..great tutorial, thanks for doing this!
Ignore my previous question..I was running stretch and didn’t realize it..great tutorial, thanks for doing this!
Thanks mate. <3 from India
Hi Andy, Thanks for providing the binaries, it got me started. After a while I decided I wanted to have the latest possible 32 bit capable release. So i started compiling that myself. It did not compile under stretch, however.
So I came up with a different solution. I compiled 3.2.21 in a docker jessie container and that worked.
I documented the solution here: https://github.com/lowdef/rpi3-mongodb3.2
Now I am wondering could you describe your build setup? Did you use some specific scons parameters or installed specific libboost version so your build would work?
Any way I have a working system now.
Best Regards,
Hans Erik
Hans, Great work! I’ll see if I can dig up my old build notes. I do remember for scons, I used ONLY 2 threads – 4 did not work AND I made a pretty large swap space which slowed everything down but was required for final linking. I also hard-wired ARM assembly flag of some kind (SWP?). You need to use Jessie primarily for its OLD SSL libraries. New MongoDB builds require different libraries that don’t seem available (or won’t build) under Stretch. — Andy
Dear Andy. Thank you very much for provisioning MongoDB 3.x for the Raspberry Pi with Raspbian Stretch. I would like to start a new Project with node.js and MongoDB. Unfortunately the versions of the mongoDB-Driver for node.js and MongoDB – which are part of the original images (11.2018]) – are old and do not work together. I hope that the problem will be solved in the future and that a newer version of MongoDB will be available once. But meanwhile your binaries are very helpful. Kind regards, Peter
Pingback: Ressources – Buildeo Wiki
hi and great work. is there any chance these binaries will work on 10/buster?
I tried to compile MongoDB 3.x under Buster but multiple libraries have significantly changed – especially openssh APIs. Right now, I am running 64-bit Ubuntu 18 on R-Pi 4 with MongoDB 4.x
Pingback: Install MongoDB in RaspberryOS Jessie or Stretch – Blinking Led