Skip to content

Instantly share code, notes, and snippets.

@c9n
Created January 4, 2016 05:25
Show Gist options
  • Save c9n/b31d3ad9314ad923699e to your computer and use it in GitHub Desktop.
Save c9n/b31d3ad9314ad923699e to your computer and use it in GitHub Desktop.
在 Mac 下编译安装 OpenResty
#!/usr/bin/env sh
pwd # /Users/Lynn/Desktop
brew install pcre
wget https://www.openssl.org/source/openssl-1.0.2e.tar.gz
tar xvf openssl-1.0.2e.tar.gz
cd ngx_openresty-1.9.7.1
# 如果去掉 --with-ld-opt 有可能会在 make 的时候报错,参考 https://github.com/openresty/ngx_openresty/issues/3
/configure --with-openssl=/Users/Lynn/Desktop/openssl-1.0.2e --with-cc-opt="-I/usr/local/include" --with-ld-opt="-L/usr/local/lib"
make
make install
@Bingnan
Copy link

Bingnan commented Sep 5, 2017

./configure —with-cc-opt="-I/usr/local/opt/openssl/include" --with-ld-opt="-L/usr/local/opt/openssl/lib"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment