Total Pageviews

Sunday, 5 June 2016

在mac上安装openssl

运行brew install openssl显示:
...
To add additional certificates, place .pem files in
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local.

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/openssl/lib
    CPPFLAGS: -I/usr/local/opt/openssl/include

==> Summary
🍺  /usr/local/Cellar/openssl/1.0.2d_1
-----------
即:在编译某个程序的源码时,在./configure那一步,要加上参数如下:
./configure  LDFLAGS=-L/usr/local/opt/openssl/lib CPPFLAGS=-I/usr/local/opt/openssl/include

然后make

实例见此:http://briteming.blogspot.com/2016/06/sockstunnel.html
---------

类似的:
yudeMacBook-Air:~ brite$ brew install libffi
Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.
==> Downloading https://mirrors.kernel.org/sources.redhat.com/libffi/libffi-3.0.

curl: (28) Resolving timed out after 5529 milliseconds
Trying a mirror...
==> Downloading ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/libffi/3.0.13
==> make install
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

Some formulae require a newer version of libffi.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/libffi/lib

==> Summary
🍺  /usr/local/Cellar/libffi/3.0.13: 14 files, 400K, built in 46 seconds

yudeMacBook-Air:~ brite$

即:在编译某个程序的源码时,在make那一步,要加上参数如下:
make  LDFLAGS=-L/usr/local/opt/libffi/lib