>  기사  >  백엔드 개발  >  mac 编译安装php7遇到问题。

mac 编译安装php7遇到问题。

WBOY
WBOY원래의
2016-06-06 20:16:08964검색

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

这个问题该怎么解决呢?

回复内容:

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

1楼的方法没效果

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

mac 编译安装php7遇到问题。

header和lib版本不匹配

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.