mac php7 安装,mac os php7.1安装

只说重点./configure --prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysqli --with-pdo-mysql --with-zlib --with-libxml-dir=/usr --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-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext=/usr/local/Cellar/gettext/0.19.8.1/ --disable-fileinfo --enable-maintainer-zts --with-png-dir=/usr/local/libpng --with-pdo-pgsql=/Applications/Postgres.app/Contents/Versions/9.5/  --with-openssl=/usr/local/Cellar/openssl/1.0.1j/

php configure: error: Cannot find libz

xcode-select --install

configure: error: Cannot locate header file libintl.hbrew install gettext

--with-gettext=/usr/local/Cellar/gettext/0.19.8.1/

configure都通过后make出错

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [sapi/cli/php] Error 1

【解决】

修改 Makefile 文件

找到 EXTRA_LIBS 节点,大概140行左右,删除所有的 -lssl 和 -lcrypto 然后追加 libssl.dylib 和

libcrypto.dylib 的路径(如果你安装了 brew,那么则是 /usr/local/opt/openssl/lib/),运行

make clean后再运行make命令。

附上我修改后的 MakeFile EXTRA_LIBS 那一行:EXTRA_LIBS = -lz -lresolv -lpq -lmcrypt -lltdl -liconv -liconv -lintl -lpng -lz  -lcurl -lz  -lm -lpthread -lxml2 -lz -licucore -lm -lcurl -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm /usr/local/opt/openssl/lib/libssl.dylib /usr/local/opt/openssl/lib/libcrypto.dylib

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值