5

I have been trying to install the latest version of mongodb on my Pi 3. I currently am running the latest version of node (8.0.0) and am running Raspbian lite - Jessie (8).

I have been following this install guide: https://docs.mongodb.com/master/tutorial/install-mongodb-on-debian/

However, upon reaching the sudo apt-get update command:

Ign http://repo.mongodb.org jessie/mongodb-org/3.4 InRelease
Hit http://repo.mongodb.org jessie/mongodb-org/3.4 Release.gpg                                         
Hit http://repo.mongodb.org jessie/mongodb-org/3.4 Release                                             
Hit http://archive.raspberrypi.org jessie InRelease                                  
Hit http://mirrordirector.raspbian.org jessie InRelease                              
Hit http://archive.raspberrypi.org jessie/main armhf Packages                       
Hit http://archive.raspberrypi.org jessie/ui armhf Packages                      
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages                                   
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages                                
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages                            
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages               
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB                                                                                                                                           
Ign http://archive.raspberrypi.org jessie/main Translation-en                                                                                                                                              
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB                                                                                                                                    
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB                                                                                                                                             
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en                                                                                                                                       
Ign http://archive.raspberrypi.org jessie/ui Translation-en                                                                                                                                                
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB                                                                                                                                       
Ign http://mirrordirector.raspbian.org jessie/main Translation-en                                                                                                                                          
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB                                                                                                                                   
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en                                                                                                                                      
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB                                                                                                                                        
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en                                                                                                                                           
W: Failed to fetch http://repo.mongodb.org/apt/debian/dists/jessie/mongodb-org/3.4/Release  Unable to find expected entry 'main/binary-armhf/Packages' in Release file (Wrong sources.list entry or malformed file)

I have removed previous packages of mongodb from /etc/ and purged the apt-get. I could just run a sudo apt-get install mongodb but that only installs version 2.4.10 and I want the latest version of mongo.

3 Answers 3

6

From the tutorial you linked to:

MongoDB only provides packages for 64-bit builds of Debian 7 and 8.

Although the Pi3 has a 64-bit processor, Raspbian is only a 32-bit OS. Also, see this related question.

5
  • 2
    Is there a way to get a 64-bit operating system then on my raspberry pi? preferably Linux based and console.
    – LandSharks
    Commented Jun 4, 2017 at 2:27
  • Fedora and Gentoo have 64-bit versions of their OS released for the Pi. If you need more info, you should post this as a new question :)
    – tlhIngan
    Commented Jun 4, 2017 at 2:37
  • This could have something to do with 32/64 bit but I think this is more aligned with the fact this isn't a x86 / x86_64 processor. It's an ARM processor. I found this thread while looking for a solution to the same problem myself but. IMHO, that is probably why.
    – jetole
    Commented Jun 5, 2017 at 2:36
  • So MongoDB just has issues supporting ARM processors then? I think I read something like that somewhere on here but I wasn't sure.
    – LandSharks
    Commented Jun 5, 2017 at 15:52
  • "MongoDB 3.4 features extended platform support. You can now run MongoDB anywhere – from ARM processors through to commodity x86 CPUs, all the way up to IBM Power and zSeries platforms." from mongodb.com/en/mongodb-3.4
    – Daniel F
    Commented Oct 10, 2017 at 9:22
1

I disagree with the comments that MongoDB has issues with ARM processors. According to this post here, MongoDB v3.3 has been supported on the 64-bit ARM version of Ubuntu 16.04 since August, and full support was announced for v3.4.

You can read instructions on installing Ubuntu Mate for the Raspberry Pi from here, and download it from here. Only version 16.04 supports the Pi (right now), and it is 32-bits, not 64. As with the previous info regarding Debian 64-bits, the MongoDB installation tutorial you linked to (if you click on Ubuntu instructions) also specifies that the main support is for 64-bit versions of Ubuntu.

So, you have the following options:

  • Install a 64-bit OS Fedora and Gentoo are the ones I have heard of. Once you are up and running, follow these instruction for a manual installation of MongoDB.
  • Install Ubuntu Mate 16.04 See which Mongo version it ships with
  • Compile from source This will be tricky, but any time a package version isn't available for your specific platform, you can always try and compile it from source. This guy did it for v3.0.9 of Mongo on the Pi2, you may be able to adapt his technique for v3.4. Note that you will not be receiving updates whenever Mongo updates their stuff. This will be your stuff, also called a fork.
1
  • If you try to build MongoDB (3.2 or 3.6) on arm (32 bit) you get an error about unsupported architecture. so it's more a 32 bit limitation than an arm limitation jira.mongodb.org/browse/SERVER-27833 Commented Jan 2, 2018 at 23:45
1

If this helps, I've created a docker image for MongoDB 3.0.14 on Raspbian Stretch https://github.com/andresvidal/rpi3-mongodb3 and https://hub.docker.com/r/andresvidal/rpi3-mongodb3/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.