OpenSSL error when starting Mongosh

Hello. I am getting an OpenSSL error after Mongosh package upgrade from mongodb-mongosh-1.10.6-1.el8.x86_64 to mongodb-mongosh-2.0.0-1.el8.x86_64. The error is exactly this:

mongosh: OpenSSL configuration error:
001908B0DC7F0000: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

I have tried to uninstall and install MongoDB, but I am getting the same error.

got the same error. started yesterday. I am on fedora 38 workstation. What I did was I uninstalled mongodb and the delete mongodb repo from /etc/yum.repos.d/. And then I manually installed the previous rpms version of mongosh shell which is 1.10.6: MongoDB Repositories.

In addition, I reinstall the following:

  • mongodb-mongosh-1.10.6.x86_64.rpm
  • mongodb-org-server-6.0.9-1.el8.x86_64.rpm
  • mongodb-org-mongos-6.0.9-1.el8.x86_64.rpm
  • mongodb-org-tools-6.0.9-1.el8.x86_64.rpm
  • mongodb-org-database-tools-extra-6.0.9-1.el8.x86_64.rpm
  • mongodb-org-database-6.0.9-1.el8.x86_64
  • mongodb-org-6.0.9-1.el8.x86_64.rpm

I tried installing the mongodb-mongosh-2.0.0.x86_64.rpm from the same repo and got the same openssl config error.

If you are going to follow this workaround, install this first mongodb-mongosh-1.10.6.x86_64.rpm. It will override the installation of other files otherwise.

Once installed:
sudo systemctl start mongod
sudo systemctl enable mongod
- if failed:
sudo systemctl daemon-reload
- then restart again…
sudo systemctl status mongod

after that I was able to use mongo shell once again.
Hope that helps. If not, please submit your workaround.

1 Like

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


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

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


$ 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

$ dnf erase -qy mongodb-mongosh


This is the same answer I posted at SO:

sam error occurred today.

aws ec2 Linux 2023
mongo 7.0.1

I solved it as follows.

  1. sudo yum remove mongodb-mongosh
  2. sudo yum install mongodb-mongosh-shared-openssl3
  3. sudo yum install mongodb-mongosh

Thanks guys. I’ve done exactly this and it worked. The @_N_A97’s solution also works.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.