Skip to content

Instantly share code, notes, and snippets.

@nazo nazo/php-build.md
Created Jan 16, 2020

Embed
What would you like to do?
Macでphp-buildする時の環境変数など一式

php-build 7.4.1

brew install libedit libiconv libxml2 oniguruma bzip2 libzip libpng icu4c libressl tidy-html5
export PATH="/usr/local/opt/krb5/bin:$PATH"
export PATH="/usr/local/opt/krb5/sbin:$PATH"
export PATH="/usr/local/opt/libressl/bin:$PATH"
export PATH="/usr/local/opt/bzip2/bin:$PATH"
export PATH="/usr/local/opt/libiconv/bin:$PATH"
export PATH="/usr/local/opt/icu4c/bin:$PATH"
export PATH="/usr/local/opt/icu4c/sbin:$PATH"
export PATH="/usr/local/opt/libxml2/bin:$PATH"

export LDFLAGS="-L/usr/local/opt/krb5/lib -L/usr/local/opt/libressl/lib -L/usr/local/opt/bzip2/lib -L/usr/local/opt/libiconv/lib -L/usr/local/opt/icu4c/lib -L/usr/local/opt/libedit
export CPPFLAGS="-I/usr/local/opt/krb5/include -I/usr/local/opt/libressl/include -I/usr/local/opt/bzip2/include -I/usr/local/opt/libiconv/include -I/usr/local/opt/icu4c/include -I/

export PKG_CONFIG_PATH="/usr/local/opt/krb5/lib/pkgconfig:/usr/local/opt/libressl/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libedit/lib/pkgconfig:/usr/local/o

export PHP_BUILD_CONFIGURE_OPTS="--with-bz2=$(brew --prefix bzip2) --with-iconv=$(brew --prefix libiconv)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.