Last night one of my CI builds ran into error by executing CMake based build with following error message:
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system
variable OPENSSL_ROOT_DIR: Found unsuitable version "0.9.8y", but required is at least "1.0.0"
Running following command to get current version of installed OpenSSL
$ openssl version -a
Gave me
Even though build was pretty recent the version number was still lower from that what I needed.
Since I am using Homebrew as package manager I could install newer version with following command.
$ brew install openssl
This however, downloads and builds OpenSSL into Homebrew local folder and does not change symlinks for currently installed version. Running the following command should update symlinks in /usr/bin
$ brew link openssl --force
But running the
$ openssl version -a
Showed the same version again so I had to update symlinks manually.
$ sudo ln -s /usr/local/Cellar/openssl/1.0.2d_1/bin/openssl /usr/bin
If you are running latest version of OSX (10.11.1 El Capitan at this moment) chances are that "System Integrity Protection" is enabled thus not allowing you to edit content under /usr/bin. You can check if this protection is enabled by running
If this protection is enabled here you can read about how to disable it before executing these commands.