Sajna Sheeja
Sajna Sheeja

Reputation: 113

Not able to Install Mongo Db on AWS Linux 2023

I'm trying to install mongodb in Amazon Linux with below configuration

NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
SUPPORT_END="2028-03-01"

I tried to install using Tarball and repo. However it got failed with below error


[root@ip ~]# mongod --version

mongod: /lib64/libcrypto.so.10: version `OPENSSL_1.0.2' not found (required by mongod)

mongod: /lib64/libcrypto.so.10: version `libcrypto.so.10' not found (required by mongod)

mongod: /lib64/libssl.so.10: version `libssl.so.10' not found (required by mongod)

[root@ip ~]# openssl version

OpenSSL 3.0.8 7 Feb 2023 (Library: OpenSSL 3.0.8 7 Feb 2023)

[root@i ~]#

tar -zxvf mongodb-linux-x86_64-amazon2-6.0.5.tgz
mongod version

Upvotes: 7

Views: 4490

Answers (1)

Criggie
Criggie

Reputation: 273

I got this working in AWS Linux 2023 (aka AL2023) by

edit /etc/yum.repos.d/mongodb-org-7.0.repo with the content:

[mongodb-org-AL2023]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2023/mongodb-org/development/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-7.0.asc

Then install packages with yum install mongodb-org-database mongodb-org-database-tools-extra

You'll get a key prompt like this

Importing GPG key 0x1785BA38:
 Userid     : "MongoDB 7.0 Release Signing Key <[email protected]>"
 Fingerprint: E588 3020 1F7D D82C D808 AA84 160D 26BB 1785 BA38
 From       : https://www.mongodb.org/static/pgp/server-7.0.asc
Is this ok [y/N]: y

After that you'll have a new systemd service called mongod.service to treat as normal.


Now, some caveats:

Good luck !

Upvotes: 7

Related Questions