当前位置:首页 > 操作系统 > MacOs

在 MACBOOK 上从源码编译 PHP

在 MACBOOK 上从源码编译 PHP

  1. 先从PHP官网下载源码

  2. 解压 tar -xzf php-x.x.x.tar.gz

  3. 进入php目录 cd php-x.x.x

  4. 执行 (这里根据自己的情况设置相对应的路径)

                    <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>
                
  5. 执行 make

    执行make会遇到问问题

  6. 执行 make install

原文:https://www.cnblogs.com/pandaLIU/p/12197297.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐