There was many answer for this question but all are for windows. There had a same question for ubuntu but had no answer (Unable to open config file /usr/lib/ssl/openssl.cnf). When ran this command in my AWS ubuntu instance
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/example.com.key -out /etc/ssl/certs/example.com.crt
It shows the error above. That error start showing after delete the /etc/ssl
folder from my instance. Please help me if anyone have solution.