LoginSignup
3
0

More than 5 years have passed since last update.

nginx source build と openssl にゃ

Last updated at Posted at 2017-03-29

結論

macOS の時は openssl のソースDLして build しろってことぽい

ネットの情報に流される 👉 ビルドできない 👉 MLから察するにソース持ってきてぽい 👉 できた

configure でこれでたら、ソースをダウンロードして ビルドする

checking for PCRE library ... found
checking for PCRE JIT support ... not found
checking for OpenSSL library ... not found
checking for OpenSSL library in /usr/local/ ... not found
checking for OpenSSL library in /usr/pkg/ ... not found
checking for OpenSSL library in /opt/local/ ... not found

./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.

コマンドのまとめ

$ wget -O nginx.tar.gz http://nginx.org/download/<version>.tar.gz
$ wget -O ssl.zip https://github.com/openssl/openssl/archive/master.zip

$ tar -zxf nginx.tar.gz
$ unzip ssl.zip

$ cd nginx-<version>

$ ./configure --with-openssl=../opnessl-master   # <- これ
$ make
$ make install 

やらなくてよかったこと

  • brew link openssl --force 👉 macOS が許可しなくなった
  • export PATH=/usr/local/opt/openssl/bin:$PATH 👉 openssl コマンド不要
  • --with-openssl=/usr/local/opt/openssl 🤛 ソースが必要ですからぁー
  • KERNEL_BITS=64 👉 不要かも

余談

brew info openssl すると 優しさに触れれる

If you need to have this software first in your PATH run:
  echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

For compilers to find this software you may need to set:
    LDFLAGS:  -L/usr/local/opt/openssl/lib
    CPPFLAGS: -I/usr/local/opt/openssl/include
For pkg-config to find this software you may need to set:
    PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig

Reference

3
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0