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.