首页 > mac 编译安装php7遇到问题。

mac 编译安装php7遇到问题。

mac编译安装php7遇到问题,错误如图

我的编译参数为:/usr/local/php7 --with-apxs2=/usr/sbin/apxs --with-mysqli --with-pdo-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --disable-fileinfo --enable-maintainer-zts

这个问题该怎么解决呢?


  1. 检查openssl的相关依赖是否装了,如果你是brew额外装了新版本的openssl,记得指向那个路径 '--with-openssl=/usr/local/opt/openssl'

  2. 如果1检查无误,在编译前make clean,并进行一次./buildconf --force


header和lib版本不匹配


自己编译恐怕是要折腾些许时日,如果非必须,在mac下,大可以brew install。


1楼的方法没效果

【热门文章】
【热门文章】