I'm afraid I have made a mess with the version (0.9.8zg) of OpenSSL which was installed on my Mac. While I was trying to update it, now I have some error and for some reasons applications like Apache or Google Drive do not work anymore and they don't even start.

I would like to know which would be the best way to restore openssl to a working version without re-installing the whole operating system.

How can I do that? Up to now I have tried to download openssl-0.9.8zg and build it with ./config, make and make install but it did not solve the problem. Please help me if possible.


I downloaded openssl-0.9.8zg from the official site and I did the following:

./Configure darwin64-x86_64-cc --prefix=/usr
sudo make install

Now the commands outputs are:

$ openssl version
OpenSSL 0.9.8zg 11 Jun 2015
$ which openssl
$ /usr/bin/openssl version
OpenSSL 0.9.8zg 11 Jun 2015
$ openssl version -a
OpenSSL 0.9.8zg 11 Jun 2015
built on: Wed Dec 30 19:50:01 CET 2015
platform: darwin64-x86_64-cc
options:  bn(64,64) md2(int) rc4(ptr,char) des(idx,cisc,16,int) idea(int) blowfish(idx) 
compiler: cc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -fomit-frame-pointer -DL_ENDIAN -DMD32_REG_T=int -Wall
OPENSSLDIR: "/usr/ssl"

Still the problem persists.

These are some errors I get: for example, when trying to start Apache, it says:

Syntax error on line 111 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/Library/modules/mod_ssl.so into server: dlopen(/Applications/MAMP/Library/modules/mod_ssl.so, 10): Symbol not found: _SSLv2_client_method
Referenced from: /Applications/MAMP/Library/modules/mod_ssl.so
Expected in: /usr/lib/libssl.0.9.8.dylib in /Applications/MAMP/Library/modules/mod_ssl.so

but libssl.0.9.8.dylib is present inside /usr/lib so I don't know why/what it does not find. Is it possible to fix this?

Or for example if I perform brew install libssl, I get:

Error: dlopen(/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15/openssl.bundle, 9): Symbol not found: _SSLv2_client_method Referenced from: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15/openssl.bundle Expected in: /usr/lib/libssl.0.9.8.dylib in /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15/openssl.bundle - /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15/openssl.bundle

Moreover Google Drive won't start anymore

  • Please open a fresh Terminal window, run openssl version, which openssl and /usr/bin/openssl version and update your question with the results. – Alistair McMillan Dec 30 '15 at 18:52
  • @AlistairMcMillan: done, I've just added them to my question – Lory Lory Dec 30 '15 at 19:03
  • Sorry one more command openssl version -a. Did you disable System Integrity Protection (SIP)? – Alistair McMillan Dec 30 '15 at 19:10
  • @AlistairMcMillan: done. Maybe yes...I am afraid I could have disabled SIP but I can't remember why...maybe to install something – Lory Lory Dec 30 '15 at 19:23
  • Also. Please update the question with the actual errors you are getting. :) – Alistair McMillan Dec 30 '15 at 19:36

Not sure if this is a complete solution but OPENSSLDIR is pointing to the wrong place. Also various compilation instructions include the "shared" option.

So try this and let us know how you get on.

./Configure darwin64-x86_64-cc --prefix=/usr --openssldir=/System/Library/OpenSSL shared
sudo make install
  • I have added the errors message I get. I'll try at once what you wrote. Thank you for the moment – Lory Lory Dec 30 '15 at 19:39
  • 1
    It really seems you are my saviour! really thank you from heart! Now everything seems to run again, I also compiled and installed openssl-1.0.2e with the commands you wrote. Thank you. Can I just ask two more things? 1 - how can I clean up my macbook? Because I had triend many things before and I image there are a lot of rubbish files... 2 - I am afraid I uninstalled man. If I run man something it says "command not found". How can I restore it? – Lory Lory Dec 30 '15 at 19:57
  • Glad that helped. I'd really recommend turning SIP back on. :) Best not to make changes to things that are bundled with the operating system. If for no other reason than when El Capitan 10.11.3 is released there is a good chance they'll overwrite the things you've installed to /usr/bin. – Alistair McMillan Dec 30 '15 at 20:00
  • About your other questions... please log them as separate questions. I'll keep an eye out for them and try to answer if I can. :) – Alistair McMillan Dec 30 '15 at 20:01
  • 1
    you have been very nice to me as very few other people were. Thank you... if you want to have a look at the "man question", it's here: apple.stackexchange.com/questions/221597/… – Lory Lory Dec 30 '15 at 20:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .