MongoDB 3.0.14 for Raspbian Stretch

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 

SaveSave

SaveSave

SaveSave

SaveSave

SaveSave

SaveSave

SaveSave

21 thoughts on “MongoDB 3.0.14 for Raspbian Stretch”

  1. Pingback: MongoDB 3.0.14 binaries for Raspberry Pi 3

  2. Pingback: MongoDB 3.0.9 binaries for Raspberry Pi 2 & 3 (Jessie)

  3. 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 ?

  4. Pingback: MongoDB 3.0.14 binaries for Raspberry Pi 3

  5. 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.

  6. 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!

    1. 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…

  7. 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

    1. 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

  8. 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

  9. Pingback: Ressources – Buildeo Wiki

    1. 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

  10. Pingback: Install MongoDB in RaspberryOS Jessie or Stretch – Blinking Led

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top