Reputation: 915
I'm trying to get a newer version of MongoDB on my Raspberry Pi 3.
I've installed mongodb by:
sudo apt-get install mongodb
The mongodb version is 2.4.14.
The mongodb queries I'm using, require MongoDB version 3.2 or higher.
To get a newer version I've removed the old mongodb and done the following:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
When I run the apt-get update I get the following error:
N: Skipping acquire of configured file 'main/binary-armhf/Packages' as repository 'http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 InRelease' doesn't support architecture 'armhf'
My OS informations on my raspberry pi:
Linux myRaspberryPi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
I'm running raspbian (which is a 32 bit system) and the raspberry pi's CPU has 64 bit.
I'm a bit lost and tried to follow a lot of guides but all with the same result - I can't seem to get a new version of MongoDB on my raspberry pi. Does anyone know if this is possible?
Upvotes: 3
Views: 23494
Reputation: 12062
Ubuntu 18.04.2 is now available in an arm64 image which works great on the raspberry pi 3 B+ hardware. The OS is 64 bit Ubuntu, and it installs the latest MongoDB in 64 bit on the raspberry pi. See here for instructions: https://wiki.ubuntu.com/ARM/RaspberryPi
Also see here: https://andyfelong.com/2019/03/mongodb-4-0-6-64-bit-on-raspberry-pi-3/
If you need compatibility for armhf software, you can install the armhf libraries manually using these commands. This will allow you to install software designed for armhf on your Ubuntu arm64 OS.
# install armhf libraries on arm64
sudo dpkg --add-architecture armhf
sudo apt-get update
sudo apt-get install libc6:armhf -y
sudo ln -s /lib/ld-linux-armhf.so.3 /lib/ld-linux.so.3
sudo apt-get install libstdc++6:armhf
armhf library install commands from here
Upvotes: 2
Reputation: 549
As specified in your error. You need a version compiled for a arm processor.
doesn't support architecture 'armhf'
The versions available on the following links are not compiled for your raspberry pi architecture.
DEBIAN: http://repo.mongodb.org/apt/debian/ UBUNTU: http://repo.mongodb.org/apt/ubuntu
and only work on below types of processors
binary-amd64
binary-i386
binary-ppc64el
A workaround would be to compile mongodb on your raspberry pi yourself.
Upvotes: 5
Reputation: 5228
If this helps, I've created a Docker Image with MongoDB 3.0.14 on Raspbian Stretch and tested on Raspberry Pi 3. Read the install details here https://github.com/andresvidal/rpi3-mongodb3 and https://hub.docker.com/r/andresvidal/rpi3-mongodb3/
Upvotes: 2