在 MACBOOK 上从源码编译 PHP
-
先从PHP官网下载源码
-
解压
tar -xzf php-x.x.x.tar.gz -
进入php目录
cd php-x.x.x -
执行 (这里根据自己的情况设置相对应的路径)
<code>./configure --prefix=(需要编译的目录下) --with-config-file-path=(需要编译的目录下)/etc --enable-mysqlnd --with-mysqli --with-pdo-mysql --enable-fpm --with-zlib --enable-xml --with-openssl=/usr/local/Cellar/openssl/1.0.2p --enable-pcntl --enable-sockets --enable-session --with-curl --enable-opcache --with-zlib-dir=/usr/local/Cellar/zlib/1.2.11 --with-iconv=/usr/local/Cellar/libiconv/1.16</code> -
执行
make执行make会遇到问问题
-
执行
make install
原文:https://www.cnblogs.com/pandaLIU/p/12197297.html
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!