Skip to content

Instantly share code, notes, and snippets.

@sakuemon
Created January 21, 2016 07:05
Show Gist options
  • Save sakuemon/d0654a28c1cfa86d4f49 to your computer and use it in GitHub Desktop.
Save sakuemon/d0654a28c1cfa86d4f49 to your computer and use it in GitHub Desktop.
How to build php on el capitan

たぶん、以下の手順でOK。 5.6.17と7.0.2はできた。 環境変数は.zshrcなり.bashrcに設定したほうが良いか。

$ brew install openssl
$ brew link openssl —force
$ export LD_LIBRARY_PATH=/usr/local/opt/openssl/lib:$LD_LIBRARY_PATH
$ export CPATH=/usr/local/opt/openssl/include:$CPATH
$ export LDFLAGS='/usr/local/opt/openssl/lib/libssl.dylib /usr/local/opt/openssl/lib/libcrypto.dylib'
$ phpenv install x.x.x
@sakuemon
Copy link
Author

環境変数は実行時に渡してもいいかな。
LD_LIBRARY_PATH=.... CPATH=... LDFLAGS=... phpenv install x.x.x

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