Skip to content

Instantly share code, notes, and snippets.

@oleg-andreyev
Created April 15, 2019 22:44
Show Gist options
  • Save oleg-andreyev/05fae22548ccdff8deebde144c4cbe7f to your computer and use it in GitHub Desktop.
Save oleg-andreyev/05fae22548ccdff8deebde144c4cbe7f to your computer and use it in GitHub Desktop.
installing PHP7 on Mojave using phpenv + php-build + brew
# https://stackoverflow.com/a/52900711/1205171
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
brew install re2c bison@2.7 openssl libjpeg libpng icu4c mcrypt
export PATH="/usr/local/opt/bison@2.7/bin:/usr/local/opt/openssl/bin:/usr/local/opt/icu4c/bin:/usr/local/opt/icu4c/sbin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/opt/icu4c/lib $LDFLAGS"
export CPPFLAGS="-I/usr/local/opt/openssl/include -I/usr/local/opt/icu4c/include $CPPFLAGS"
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig:$PKG_CONFIG_PATH"
phpenv install 7.0.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment