mongosh not running: digital envelope routines:alg_module_init:unknown [closed]
Asked Answered
A

1

7

I have just installed mongodb 7 on my new amazon linux 2023 machine. Mongodb itself appears to be running fine, but I can't run mongosh as I get the error below. I have reinstalled everything multiple times (including openssh), but nothing helps. Any suggestions are greatly appreciated.

[ec2-user@ip-172-31-35-26 ~]$ mongosh
mongosh: OpenSSL configuration error:
00590487347F0000:error:030000A9:digital envelope routines:alg_module_init:unknown option:../deps/openssl/openssl/crypto/evp/evp_cnf.c:61:name=rh-allow-sha1-signatures, value=yes

When I install MongoDB I see this:

Installed:
  cyrus-sasl-2.1.27-18.amzn2023.0.3.x86_64         cyrus-sasl-gssapi-2.1.27-18.amzn2023.0.3.x86_64       mongodb-database-tools-100.8.0-1.x86_64                        mongodb-mongosh-2.0.0-1.el8.x86_64              
  mongodb-org-7.0.1-1.amzn2023.x86_64              mongodb-org-database-7.0.1-1.amzn2023.x86_64          mongodb-org-database-tools-extra-7.0.1-1.amzn2023.x86_64       mongodb-org-mongos-7.0.1-1.amzn2023.x86_64      
  mongodb-org-server-7.0.1-1.amzn2023.x86_64       mongodb-org-tools-7.0.1-1.amzn2023.x86_64             openssl-1:3.0.8-1.amzn2023.0.4.x86_64                         

Complete!
Autocracy answered 7/9, 2023 at 20:14 Comment(2)
Amazon Linux 2023 is relatively new. MongoDB is playing catch-up to get their installers correct for the dependencies on this platform. Others are having difficulties too - see mongodb.com/community/forums/t/… . I think it is a compatibility problem with the installed version of openSSL. I don't think there is anything you can do about this until MongoDB fixes the installer. You could use Amazon LInux 2 instead...Knish
did you solved the problem ? I'm facing the same error mongosh: OpenSSL configuration error: 0048B47AAE7F0000:error:030000A9:digital envelope routines:alg_module_init:unknown option:../deps/openssl/openssl/crypto/evp/evp_cnf.c:61:name=rh-allow-sha1-signatures, value=yesPotty
H
19

Instead of mongodb-mongosh, try installing mongodb-mongosh-shared-openssl3, which is intended for OpenSSL v3, the bundled version of AL2023.

For me, it solved the problem:

$ # Run the following first if you have mongodb-mongosh already installed
$ dnf erase -qy mongodb-mongosh
$ # This will install a version compatible with OpenSSL v3
$ dnf install -qy mongodb-mongosh-shared-openssl3

Installed:
  mongodb-mongosh-shared-openssl3-2.0.0-1.el8.aarch64

$ # Verify installation
$ if mongosh --help 1>/dev/null; then echo 'OK'; else echo '!!!NG!!!'; fi
OK

$ # This WILL NOT work
$ dnf install -qy mongodb-mongosh

Installed:
  mongodb-mongosh-2.0.0-1.el8.aarch64

$ # Verify installation
$ if mongosh --help 1>/dev/null; then echo 'OK'; else echo '!!!NG!!!'; fi
mongosh: OpenSSL configuration error:
20B0BFA4FFFF0000:error:030000A9:digital envelope routines:alg_module_init:unknown option:../deps/openssl/openssl/crypto/evp/evp_cnf.c:61:name=rh-allow-sha1-signatures, value=yes


!!!NG!!!
# Don't forget to clean up...
$ dnf erase -qy mongodb-mongosh

Removed:
  mongodb-mongosh-2.0.0-1.el8.aarch64
Hankypanky answered 12/9, 2023 at 3:20 Comment(3)
I'm seeing the error below when attempting to run dnf install -qy mongodb-mongosh-shared-openssl3 Error: Transaction test error: file /usr/bin/mongosh from install of mongodb-mongosh-shared-openssl3-2.0.1-1.el8.aarch64 conflicts with file from package mongodb-mongosh-2.0.1-1.el8.aarch64Renoir
@Renoir It seems mongodb-mongosh is already installed in place of mongodb-mongosh-shared-openssl3. Try dnf erase -qy mongodb-mongosh to remove it first, then run dnf install -qy mongodb-mongosh-shared-openssl3 .Hankypanky
I think they want us to call the custome service :-)Blancmange

© 2022 - 2024 — McMap. All rights reserved.