MongoDB Community 6.0.5 Illegal instruction (core dumped) ubuntu 18.04 on Cortex-A72 aarch64

I am trying to install and start a MongoDB on a fresh installation of Ubuntu 18.04.
I followed the setup tutorial and did the following steps:

  1. curl -fsSL https://pgp.mongodb.com/server-6.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg --dearmor
  2. echo “deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] MongoDB Repositories bionic/mongodb-org/6.0 multiverse” | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
  3. apt-get update
  4. apt-get install -y mongodb-org
  5. systemctl start mongod

When I run systemctl status mongod I get the following error:

I tried the following things to fix this error:

  1. Restart the service with systemctl
  2. Uninstalling MongoDB with sudo apt-get purge mongodb-org* , deleting all /var/log/mongodb , /var/lib/mongodb directories and all other files containing the name mongo , as well as the user and usergroup mongodb
  3. installing version 4.4/5.0 of Mongo DB,Still the same problem

I am really stuck here, I hope someone has an idea because MongoDB is essential to the stuff I’m working on arm…

Needs a later version of Arm than you have.

You will be limited to v4.4 unless you compile from source.

Matt_Kneiser recently posted regrading this along with his repo and binaries.

I was playing about with installs on Pi’s today:

  • 4.4.18 is the most up-to-date release that ran on the Pi’s I have available (Pi3B, Pi4B and an Orange Pi 3LTS), i.e. on the ARMv8.0 microarchitecture. MongoDB 4.4.19 and later, 5.0 and later and 6.0 and later all need the ARMv8.2-A microarchitecture. There’s no Raspberry Pi available with that microarchitecture as far as I’m aware, but the Orange Pi 5 does have it so should - in theory - run MongoDB 5 and 6.

  • 4.4.18 will not install on Ubuntu 22.04LTS - there’s missing libssl dependencies. Use Ubuntu 20.04LTS. Alternatively, I did find the Ubuntu packages for 4.4.18 installed without any apparent issue on the latest (Debian Bullseye based) Pi OS distributions. I haven’t dug too far into this and the possibility of incompatibilities with this combination exists so use at your own risk.

  • You’ll want to pin the installed packages to 4.4.18:

echo "mongodb-org hold" | sudo dpkg --set-selections
echo "mongodb-org-server hold" | sudo dpkg --set-selections
echo "mongodb-org-shell hold" | sudo dpkg --set-selections
echo "mongodb-org-mongos hold" | sudo dpkg --set-selections
echo "mongodb-org-tools hold" | sudo dpkg --set-selections
echo "mongodb-org-database-tools-extra hold" | sudo dpkg --set-selections

4.4.18 was released in November 2022 and probably supports most of the features people would want in a SBC based installation. If you do need access to newer versions, a free-tier Atlas instance is always an option.

Quick update.

I picked up a Pi 5 the other day, and I just confirmed it allows MongoDB 7.0.4 Community to install and run without any apparent issue using the official install guide. I had to use Ubuntu because Pi OS, being Debian based, is not supported on ARM64 and reports an incompatible architecture.

The only issue noted was the official Ubuntu image for Pi uses EXT4 where MongoDB recommends XFS for Wired Tiger, but for anything you are likely to do on a Raspberry Pi, I doubt it’ll make that much of a difference.

1 Like

Nice @Graeme_Robinson, but you should have bought enough Pi 5 for everybody.

1 Like

One more update on this. Whilst MongoDB 7 is not currently supported on ARM64 hardware on Debian, ARM64 is supported on Ubuntu. It occurred to me that as both Ubuntu and Pi OS are Debian based, the Ubuntu MongoDB distribution might run on Pi OS.

Sure enough, following the install instructions for Ubuntu whilst running Pi OS (64 bit) on my Pi 5 resulted in a running MongoDB 7 Community installation.

Obviously, this is an untested combination so use at your own risk, but my guess is the chances of Pi OS specific problems occurring are pretty low.

The Pi 5 seems to run cooler - at least at idle - under Pi OS than Ubuntu. The fan in the official case isn’t loud, but it’s noticeable, and it was spinning up and down regularly on Ubuntu at idle whilst it’s silent at idle under Pi OS, so I’ll probably stick with Pi OS for this reason if nothing else.

Yay Pi 5.

@Graeme_Robinson

Sounds like you should author an ‘authoritative’ post that we can point to once the Pi5 adopters start showing up.

I’d imagine that the storage can be repartitioned(or the installer configured to not autoexpand) such that a XFS partition can be created ?

How’s this?

2 Likes

Amazing @Graeme_Robinson.

Absolutely comprehensive, great resource.

I love the RPi too. I have a Pi 3 and 2 Pi 5 4.

From your article, Pi 5 is blazing fast compared with prior versions makes we want a 5 too.

1 Like