Mac OS X Yosemite 手动编译PHP5.6

cd /usr/local/src/php-5.6.0/

./configure \
--prefix=/usr/local/php56 \
--with-config-file-path=/usr/local/php56/etc \
--enable-inline-optimization \
--disable-debug \
--disable-rpath \
--enable-shared \
--enable-opcache \
--enable-fpm \
--with-fpm-user=www \
--with-fpm-group=www \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-gettext \
--enable-mbstring \
--with-iconv \
--with-mcrypt \
--with-mhash \
--with-openssl \
--enable-bcmath \
--enable-soap \
--with-libxml-dir \
--enable-pcntl \
--enable-shmop \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--with-curl \
--with-zlib \
--enable-zip \
--with-bz2 \

出现如下错误:

configure: error: Cannot locate header file libintl.h


brew install gettext


vim configure

找到43076行。

if test "$PHP_GETTEXT" != "no"; then
  for i in $PHP_GETTEXT /usr/local /usr /usr/local/opt/gettext; do
    test -r $i/include/libintl.h && GETTEXT_DIR=$i && break
  done


你可能感兴趣的:(Mac OS X Yosemite 手动编译PHP5.6)