Skip to content

Instantly share code, notes, and snippets.

@YouSysAdmin
Created September 21, 2022 08:15
Show Gist options
  • Save YouSysAdmin/58b3d2445d2ff21eed0bcee2cf0c1158 to your computer and use it in GitHub Desktop.
Save YouSysAdmin/58b3d2445d2ff21eed0bcee2cf0c1158 to your computer and use it in GitHub Desktop.

PHPENV + MacOS

Install PHPENV

https://github.com/phpenv/phpenv

Install additional pkg's

brew install \
    autoconf \
    bzip2 \
    icu4c \
    krb5 \
    libedit \
    libiconv \
    libjpeg \
    libpng \
    libxml2 \
    libzip \
    [email protected] \
    pkg-config \
    tidy-html5 \
    libxslt \
    pcre2

Install PHP

PHP_RPATHS="$(brew --prefix bzip2)" \
PHP_BUILD_CONFIGURE_OPTS="--with-bz2=$(brew --prefix bzip2) --with-iconv=$(brew --prefix libiconv) --with-tidy=$(brew --prefix tidy-html5) --with-external-pcre=$(brew --prefix pcre2) --with-zip --enable-intl --with-pear" \
PKG_CONFIG_PATH="$(brew --prefix krb5)/lib/pkgconfig:$(brew --prefix icu4c)/lib/pkgconfig:$(brew --prefix libedit)/lib/pkgconfig:$(brew --prefix libjpeg)/lib/pkgconfig:$(brew --prefix libpng)/lib/pkgconfig:$(brew --prefix libxml2)/lib/pkgconfig:$(brew --prefix libzip)/lib/pkgconfig:$(brew --prefix [email protected])/lib/pkgconfig:$(brew --prefix tidy-html5)/lib/pkgconfig" \
phpenv install 7.4.30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment