WARNING: can’t open config file: /usr/local/ssl/openssl.cnf

This error occurs mainly on windows when you are using openssl package,

The reason is that openssl failed to locate the openssl.cnf file

I will recommend that you do the following (one windows only)

  1. Open your command prompt as Administrator (few openssl commands opens in random state), thus when openssl tries to write stuff on your disk it fails. There could be another workaround but i am not aware of that.
  2. Now before you run any openssl command type the following.

 

  1. set OPENSSL_CONF=c:\[PATH TO YOUR OPENSSL DIRECTORY]\bin\openssl.cfg 

after you did the above now you are good to go with your openssl stuff.

Remember that everytime you open a command prompt you have to run the above command unless you set this as your environment variable.

 

 

I hope this helps. If it does then don’t forget to leave your comments below.

 

Cheers.

 

.

Search Terms:

Jaspreet Chahal

Self-confessed Max Payne and Howzat Cricket game addict. Big fan of Dharmendra, Keanu reeves & Lawrence "Larry" Page. I love my Wife, my son and bit of geeky stuff. I started falling in love with Blog'in last year. Writing is tending out to be fun. I write on situation I was in thus my post always travel around web development stuff. I hope you enjoy my posts.

More Posts - Website

Follow Me:
TwitterFacebookPinterestYouTube

Comments

  1. dhananjay says:

    thanks a lot,

    it worked for me…..

  2. mkb says:

    Great tip!

    Worked for me with Win32OpenSSL_Light-1_0_0e.exe on Win2K3.


    mkb

  3. Greg says:

    Thank you very much for the solution!

  4. Zed says:

    This package didn’t contain a openssl.cnf file. I also ran the set statement but still get the same error. :(

  5. Balraj says:

    Thanks, Jaspreet. It worked for me.

  6. Charlie says:

    Thanks. That info isn’t on documentation… neither the variable name.

  7. Claudio says:

    Worked great. Thanks!

  8. datsmee says:

    Gracias

  9. JQ says:

    Well done. Good tip!

    The default install of the win32 version of OpenSSL was c:\OpenSSL-Win32.
    Thus, I needed to use the command: set OPENSSL_CONF=c:\openssl-win32\bin\openssl.cfg to get this to work

  10. Aaron says:

    Worked like a charm. Thank you.

  11. Stefan says:

    It worked for me, thank you very much !!

  12. Akshay says:

    Thanks for this, worked for me!

  13. Andy says:

    What worked for me was creating a permanent Windows environment variable called OPENSSL_CONF and giving it the value C:OpenSSL-Win32binopenssl.cfg

    Thanks pointing me in the right direction,
    Andy

  14. petey says:

    Thanks a lot, this saved me some time today. SSL can be so frustrating!

  15. ld13 says:

    Installed the lite package… Error: ‘set’ is an invalid command

    Lol. What on earth.

  16. ld13 says:

    …make way for the n00b – I see what I did wrong!

  17. Aurélien says:

    Thank you a lot. :D

  18. Kari says:

    It worked for me too. Thank you.

  19. yogi says:

    Worked great. Thanks a lot

Speak Your Mind

*

CommentLuv badge