Instead of mongodb-mongosh
, try installing mongodb-mongosh-shared-openssl3
or mongodb-mongosh-shared-openssl11
that fits for your running environment.
For Amazon Linux 2023 where OpenSSL v3 is bundled with, it solved the problem:
$ # This will do
$ dnf install -qy mongodb-mongosh-shared-openssl3
Installed:
mongodb-mongosh-shared-openssl3-2.0.0-1.el8.aarch64
$ if `mongosh --help 1>/dev/null`; then echo 'OK'; else echo '!!!NG!!!'; fi
OK
$ # This WILL NOT do
$ dnf install -qy mongodb-mongosh
Installed:
mongodb-mongosh-2.0.0-1.el8.aarch64
$ 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!!!
$ dnf erase -qy mongodb-mongosh
Removed:
mongodb-mongosh-2.0.0-1.el8.aarch64
This is the same answer I posted at SO: