Cannot install MongoDB on BeagleBone Green

The installation of MongoDB is still unsuccessful on the BeagleBone Green card.

More information about this BBG:

debian@beaglebone:/var/lib/cloud9$ uname -a
Linux beaglebone 4.9.82-ti-r102 #1 SMP PREEMPT Thu Feb 22 01:16:12 UTC 2018 armv7l GNU/Linux

debian@beaglebone:/var/lib/cloud9$ cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Even I tried to follow this tutorial : https://docs.mongodb.com/v3.0/tutorial/install-mongodb-on-debian/ as below :

debian@beaglebone:/var/lib/cloud9$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
Executing: /tmp/apt-key-gpghome.jgT79mhjhQ/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
gpg: key 58712A2291FA4AD5: "MongoDB 3.6 Release Signing Key <packaging@mongodb.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
debian@beaglebone:/var/lib/cloud9$ echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 main
debian@beaglebone:/var/lib/cloud9$ echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/{+package-branch+} main" | sudo tee /etc/apt/sources.list.d/mongodb-org-{+version+}.list
deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/{+package-branch+} main
debian@beaglebone:/var/lib/cloud9$ sudo apt-get update
Ign:1 http://deb.debian.org/debian stretch InRelease
Hit:2 http://deb.debian.org/debian stretch-updates InRelease                     
Get:3 http://deb.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:4 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 InRelease                                  
Hit:5 http://repos.rcn-ee.com/debian stretch InRelease                               
Hit:6 http://deb.debian.org/debian stretch Release                       
Get:7 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 Release [2393 B]
Get:8 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 Release.gpg [801 B]
Fetched 97.5 kB in 5s (17.8 kB/s)                         
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-armhf/Packages' as repository 'http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 InRelease' doesn't support architecture 'armhf'
debian@beaglebone:/var/lib/cloud9$ sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package mongodb-org
debian@beaglebone:/var/lib/cloud9$ sudo apt-get install -y mongodb-org=3.6.4 mongodb-org-server=3.6.4 mongodb-org-shell=3.6.4 mongodb-org-mongos=3.6.4 mongodb-org-tools=3.6.4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package mongodb-org
E: Unable to locate package mongodb-org-server
E: Unable to locate package mongodb-org-shell
E: Unable to locate package mongodb-org-mongos
E: Unable to locate package mongodb-org-tools
debian@beaglebone:/var/lib/cloud9$ echo "mongodb-org hold" | sudo dpkg --set-selections
dpkg: warning: package not in status nor available database at line 1: mongodb-org
dpkg: warning: found unknown packages; this might mean the available database
is outdated, and needs to be updated through a frontend method;
please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>
debian@beaglebone:/var/lib/cloud9$ echo "mongodb-org-server hold" | sudo dpkg --set-selections
dpkg: warning: package not in status nor available database at line 1: mongodb-org-server
dpkg: warning: found unknown packages; this might mean the available database
is outdated, and needs to be updated through a frontend method;
please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>
debian@beaglebone:/var/lib/cloud9$ echo "mongodb-org-shell hold" | sudo dpkg --set-selections
dpkg: warning: package not in status nor available database at line 1: mongodb-org-shell
dpkg: warning: found unknown packages; this might mean the available database
is outdated, and needs to be updated through a frontend method;
please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>
debian@beaglebone:/var/lib/cloud9$ echo "mongodb-org-mongos hold" | sudo dpkg --set-selections
dpkg: warning: package not in status nor available database at line 1: mongodb-org-mongos
dpkg: warning: found unknown packages; this might mean the available database
is outdated, and needs to be updated through a frontend method;
please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>
debian@beaglebone:/var/lib/cloud9$ echo "mongodb-org-tools hold" | sudo dpkg --set-selections
dpkg: warning: package not in status nor available database at line 1: mongodb-org-tools
dpkg: warning: found unknown packages; this might mean the available database
is outdated, and needs to be updated through a frontend method;
please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>

but the problem is still the same.

How can I fix this issue please?

>N:Skippingacquire of configured file 'main/binary-armhf/Packages'as
repository 'MongoDB Repositories wheezy/mongodb-org/3.6
InRelease'doesn't support architecture 'armhf'|

That there, would be a good reason why it didn't work. It's not
available for that architecture.

Plus the fact, that repository is for Debian Wheezy (aka Debian 7),
which is quite long in the tooth now. There's a version of MongoDB in
the repositories for Wheezy, but it's MongoDB 2.0.6 if you go the
standard version, or you can find 2.4.6 in backports.

I notice Jessie (aka Debian 8) has it available (version 2.4.10) for
`armhf`. Stretch jumps to version 3.2, which ought to support `armhf`,
however Debian have opted to not ship an `armhf` port in that release.

It's worth noting that both the BeagleBone and the Raspberry Pi (when
running in 32-bit mode) are both `armhf` architectures, so one option
might be to try the following:

http://koenaerts.ca/compile-and-install-mongodb-on-raspberry-pi/

Those instructions talk about compiling MongoDB 3.2. I note you were
trying to use a version 3.6 repository. That article gives a clue as to
why there isn't a MongoDB 3.6 binary available:

The highest MongoDB version that will run on 32 bit is v3.2. As of MongoDB v3.4 only 64 bit versions are supported. MongoDB v3.2 is the latest version that you will be able to run on a 32 bit Raspbian. In addition, you will not be able to run MongoDB with the WiredTiger storage engine since it only works on 64 bit versions. You will have to start the DB with the MMAPv1 storage engine. Also MMAPv1 has a limit of 2GB of storage, at least on ARM32. Once your DB hits that limit, you’re out of luck.

The same will apply to standard BeagleBone distributions, as like
Raspbian, they are also 32-bit. So from where I sit, these are your
options:

1. Look around for some .deb packages that some kind soul may have
compiled for you for `armhf`. (I don't see any official repositories.)
2. Compile it yourself, using the above instructions

Both these; bear in mind, will mean your MongoDB install is
significantly hobbled. Probably not a big issue for the size of
database that you're likely to use on a BeagleBone, but worth remembering.

As the AM3358 is a 32-bit processor, you're not going to get an ARM64
build of Linux running, so anything newer than MongoDB 3.2 is out.

Hello Stuart,

I try that, but it’s not working…

On 03/06/18 01:40, Ichrak Mansour **top-posted**:

Hello Stuart,

I try that, but it's not working..

Well, that doesn't leave many options. I don't know what's "not
working" because you haven't said.

It's fair to say that MongoDB's authors aren't interested in supporting
32-bit platforms, otherwise you'd be able to build the later versions on
i386 and armhf too.

Given this, I'd be highly surprised if there was any motivation for them
to solve issues with MongoDB 3.2, which if isn't out of support, will be
so soon enough. So in my book, pursuing this a technical dead end.

Perhaps we need to review why you're installing MongoDB? You might be
better off with PostgreSQL, MySQL/MariaDB, SQLite, or perhaps Redis,
rocksdb or whitedb, all of which are in the standard Debian repositories.

I tried to install MongoDB but still no solution, I am forced to use MongoDB so the only solution it to update the card to Debian 7 or 8 bearable Mongo, it’s working?

"forced to use MongoDB", then the BBG isn't really a production option for you..

See:

https://groups.google.com/forum/#!msg/mongodb-dev/G-kGjZEEam0/VSVB9fYCBAAJ

<quote>
Please be aware of the following important caveat: you are building
for an unsupported architecture. The WiredTiger storage engine won't
run there (it requires 64-bit), and MMAPv1 is limited to only 1-2 GB
of data on 32-bit, total, depending on whether you are running
journaling, and we currently only support x86. So, please understand
that 32-bit ARM will never be a supported configuration, and there are
no assurances that the database will function correctly on such a
platform. The configuration that you generate here will not be
upstreamed or added to the main MongoDB sources.
</quote>

Your best bet is to get an amd64, arm64, or ppc64el based device.

Regards,