mongodb 无法在AWS Linux 2023上安装Mongo Db

qfe3c7zg  于 2023-04-11  发布在  Go
关注(0)|答案(1)|浏览(224)

我正在尝试使用以下配置在Amazon Linux中安装mongodb

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"

我尝试使用Tarball和repo安装。但是它失败了,错误如下

[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
vybvopom

vybvopom1#

我在AWS Linux 2023(又名AL 2023)中得到了这个工作
编辑/etc/yum.repos.d/mongodb-org-7.0.repo,内容为:

[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

然后安装带有yum install mongodb-org-database mongodb-org-database-tools-extra的软件包
你会得到一个像这样的按键提示

Importing GPG key 0x1785BA38:
 Userid     : "MongoDB 7.0 Release Signing Key <packaging@mongodb.com>"
 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

之后,您将有一个名为mongod.service的新systemd服务,可以正常对待。
现在,一些警告:

祝你好运!

相关问题