Linux - illegal instruction (core dumped) MongoDB

What is the issue?

While using mongoDB on linux after using start command sudo systemctl start mongod. Illegal instruction (core dumped) is showing in Terminal

How to fix it?1.

Stop the mongod process by issuing the following command:-

sudo service mongod stop

Remove any MongoDB packages that you had previously installed:-

sudo apt-get purge mongodb-org*

Remove MongoDB databases and log files:-

sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb

Then reinstall MongoDB 4.4.8 Import the public key used by the package management system:-

wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -

The following instruction is for: Ubuntu 20.04 Focal:-

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list

Ubuntu 18.04 Bionic:-

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list

Ubuntu 16.04 Xenial

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list

Reload local package databaset

sudo apt-get update

Install mongoDB 4.4.x. (Now available 4.4.15)

sudo apt-get install -y mongodb-org=4.4.15 mongodb-org-server=4.4.15 mongodb-org-shell=4.4.15 mongodb-org-mongos=4.4.15 mongodb-org-tools=4.4.15

Use mongod --version to check if it is successfully installed.

If you encounter any error while using mongod

sudo mkdir /data
cd /data
sudo mkdir db
sudo pkill -f mongod

Then use sudo mongod command.

Why is this error?

MongoDB 5.0 requires a Sandy Bridge or newer CPU. Get a newer processor or use an older version of MongoDB.