I have been trying to install mongodb following the official documentation. So I followed these steps:
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
sudo apt-get update
When I reach this step:
sudo apt-get install -y mongodb-org
This error gets thrown.
E: Unable to locate package mongodb-org
I looked it up all over the internet and I couldn’t find any solution even though it has been asked several times;
After doing some research, I have found this stackoverflow question where most answers say that I should just:
At first try with this command: sudo apt-get install -y mongodb
This is the unofficial mongodb package provided by Ubuntu and it is
not maintained by MongoDB and conflict with MongoDB’s offically
But, this seems to be an outdated answer which explains when I tried to do mongodump using the installed mongodb with that approach, it did not work.
After using the Outdated approach, this the installed mongodb info. I do understand they’re outdated.
MongoDB shell version: 2.6.10
db version v2.6.10
This is the system info.
Operating System: Ubuntu 16.04.7 LTS
Kernel: Linux 4.4.0-210-generic
I would really appreciate any help.