hiwordls
hiwordls

Reputation: 781

OpenSSL install issue to MAC

I tried to install openSSL to my MAC but I did not. I watched the steps below, but I could not understand exactly what you should do. I am a new mac user. Please tell us about what to do as a simple

Step 1) Download OpenSSL 0.9.6c here: http://www.openssl.org/source/openssl-0.9.6c.tar.gz

Step 2) Uncompress the archive and rename the resulting folder "openssl"

step 3) Open up the terminal and type cd /users/YOURUSERNAME/desktop/

step 4) type sudo mv openssh /usr/local/

step 5) type sudo cd /usr/local/openssl

step 6) type ./config

step 7) type make

step 8) type make install

Upvotes: 0

Views: 16352

Answers (1)

jww
jww

Reputation: 102205

Download OpenSSL 0.9.6c here

Man, 0.9.6 is old. Are you sure you want/need it?


Here's the recipe using OpenSSL 1.0.1f:

$ wget http://www.openssl.org/source/openssl-1.0.1f.tar.gz

$ tar xzf openssl-1.0.1f.tar.gz

$ cd openssl-1.0.1f

$ ./Configure darwin64-x86_64-cc

$ make all

$ sudo make install

If you are on an old 32-bit Mac, then use ./Configure darwin-i386-cc.

There's no need to build in /usr/local using sudo. In fact, its preferred to compile under an unprivileged account and only elevate during install.


OpenSSL comes with 0.9.8. To ensure you use the copy of OpenSSL you just downloaded, built and installed:

gcc -I/usr/local/ssl/include <your source files> -o <your prog name> -L/usr/local/ssl/lib -lssl -lcrypto -lpthread -ldl

The trick is that OpenSSL installs into /usr/local/ssl. So you find headers in /usr/local/ssl/include and libraries in /usr/local/ssl/lib.

Upvotes: 6

Related Questions