Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

install openssl-devel on Mac

Tags:

macos

openssl

I need to install the openssl-devel on Mac. But I've tried brew and macport both. Neither of them work.

And I have also googled this problem--- install openssl-devel on Mac. But, I did not find an exact answer.

Anyone met this kind of problem before?

like image 214
Tian Gao Avatar asked Apr 15 '15 13:04

Tian Gao


People also ask

How do I download OpenSSL on my Mac?

Deploy the OpenSSL toolkit via the command line To install the OpenSSL toolkit and library on your Mac, you must open the Terminal application, go to the OpenSSL source folder, and follow the instructions from the INSTALL file included in the archive.

Can I use OpenSSL on Mac?

If your app depends on OpenSSL, you should compile OpenSSL yourself and statically link a known version of OpenSSL into your app. This use of OpenSSL is possible on both OS X and iOS.


2 Answers

this command solve my problem:

brew install [email protected]
cp /usr/local/opt/[email protected]/lib/pkgconfig/*.pc /usr/local/lib/pkgconfig/
like image 122
Andy Tao Avatar answered Oct 14 '22 02:10

Andy Tao


This has changed with the latest verison of brew on Big Sur (11.5.1) on a Macbook M1 (just for completeness):

export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
like image 11
MuseumPiece Avatar answered Oct 14 '22 02:10

MuseumPiece