patternMinor
MongoDB install on ARM?
Viewed 0 times
armmongodbinstall
Problem
I'm working to install Mongo on an arm64 machine with no success. Any ideas on what I'm missing? I'm following the steps defined at: https://www.mongodb.com/docs/upcoming/tutorial/install-mongodb-enterprise-on-ubuntu/
The error I see and the steps I followed are below. Any suggestions are appreciated.
The steps I executed to get here were:
As a final data point, when I try to execute mongod directly, I get this error:
The error I see and the steps I followed are below. Any suggestions are appreciated.
root@bamboo8:~# systemctl status mongod
* mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: failed (Result: signal) since Tue 2022-08-30 17:43:28 EDT; 5s ago
Docs: https://docs.mongodb.org/manual
Process: 2946 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=killed, signal=ILL)
Main PID: 2946 (code=killed, signal=ILL)
Aug 30 17:43:28 bamboo8 systemd[1]: Started MongoDB Database Server.
Aug 30 17:43:28 bamboo8 systemd[1]: mongod.service: Main process exited, code=killed, status=4/ILL
Aug 30 17:43:28 bamboo8 systemd[1]: mongod.service: Failed with result 'signal'.The steps I executed to get here were:
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add –
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.com/apt/ubuntu focal/mongodb-enterprise/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
sudo apt-get update
sudo apt-get install -y mongodb-enterprise
sudo systemctl start mongod
sudo systemctl status mongodAs a final data point, when I try to execute mongod directly, I get this error:
$ /usr/bin/mongod --version
Illegal instructionSolution
The ILL (Illegal Instruction) exception indicates you are trying to run binaries that aren't fully compatible with your CPU.
As of MongoDB 5.0+, the Minimum Microarchitecture requirement for official arm64 binaries is ARMv8.2-A or later. Some older or lower spec CPUs (like Raspberry Pi or Chromebooks) will not meet this requirement.
Workarounds are:
-
Install a MongoDB server binary compiled with lower microarchitecture requirements. I recommend trying the latest MongoDB 4.4.x arm64 server packages).
-
Build MongoDB server from source specifying an arm64 microarchitecture target compatible with your CPU. For example, using
As of MongoDB 5.0+, the Minimum Microarchitecture requirement for official arm64 binaries is ARMv8.2-A or later. Some older or lower spec CPUs (like Raspberry Pi or Chromebooks) will not meet this requirement.
Workarounds are:
-
Install a MongoDB server binary compiled with lower microarchitecture requirements. I recommend trying the latest MongoDB 4.4.x arm64 server packages).
-
Build MongoDB server from source specifying an arm64 microarchitecture target compatible with your CPU. For example, using
scons ... CCFLAGS=-march=arm8-a or -march=generic (if you don't want to try for any CPU optimisations).Context
StackExchange Database Administrators Q#316286, answer score: 4
Revisions (0)
No revisions yet.