Reading this article
https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/
I try to install mongodb on my remote ubuntu 18 I got error :
root@nsn-do-lamp:~# wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
OK
root@nsn-do-lamp:~#
root@nsn-do-lamp:~# wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
OK
root@nsn-do-lamp:~# echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse
root@nsn-do-lamp:~# sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mongodb-org
root@nsn-do-lamp:~# sudo apt-get update
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:2 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Hit:3 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Hit:4 http://mirrors.digitalocean.com/ubuntu bionic InRelease
Hit:5 https://deb.nodesource.com/node_14.x bionic InRelease
Hit:6 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:7 http://mirrors.digitalocean.com/ubuntu bionic-updates InRelease
Hit:8 http://mirrors.digitalocean.com/ubuntu bionic-backports InRelease
Ign:9 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 InRelease
Get:10 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 Release [4412 B]
Get:11 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 Release.gpg [801 B]
Get:12 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0/multiverse amd64 Packages [6644 B]
Get:13 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0/multiverse arm64 Packages [5562 B]
Fetched 17.4 kB in 2s (9957 B/s)
Reading package lists... Done
root@nsn-do-lamp:~# sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mongodb-org : Depends: mongodb-org-database but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
...
root@nsn-do-lamp:~# uname -a
Linux nsn-do-lamp 4.15.0-191-generic #202-Ubuntu SMP Thu Aug 4 01:49:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
root@nsn-do-lamp:~# lsb_release -d; uname -r; uname -i
Description: Ubuntu 18.04.5 LTS
4.15.0-191-generic
x86_64
Why I got the error and how can it be fixed ?
UPDATED :
I tried to fix this problem with proposed methods and got error :
sudo apt-get install -y mongodb-org-mongos mongodb-org-server mongodb-org mongodb-org-database
...
The following packages have unmet dependencies:
mongodb-org-mongos : Depends: libc6 (>= 2.29) but 2.27-3ubuntu1.6 is to be installed
Depends: libgcc-s1 (>= 4.2) but it is not installable
mongodb-org-server : Depends: libc6 (>= 2.29) but 2.27-3ubuntu1.6 is to be installed
Depends: libgcc-s1 (>= 4.2) but it is not installable
E: Unable to correct problems, you have held broken packages.
Looks like I have old ubuntu 18 and that eaised this error
I suppose that it could be salved with option “Install a specific release of MongoDB.”
But I am not sure which version(how can I find it) of MongoDB have I to install ?
Thanks!