我是靠谱客的博主 迅速月饼,最近开发中收集的这篇文章主要介绍mac os x 10.11 php7,mac osx 10.11.2安装PHP7提示“configure: error: libcrypto not found!”,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

刚升级到了最新的系统OS X 10.11.2,在安装PHP7时

./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-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --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-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --disable-fileinfo --enable-maintainer-zts

时,提示错误:

checking for xml2-config path... /usr/bin/xml2-config

checking whether libxml build works... yes

checking for OpenSSL support... yes

checking for Kerberos support... no

checking whether to use system default cipher list instead of hardcoded value... no

checking for RAND_egd... no

checking for pkg-config... no

checking for OpenSSL version... >= 0.9.8

checking for CRYPTO_free in -lcrypto... no

configure: error: libcrypto not found!

百度了一下,这个和openssl有关系 ,目前openssl已经安装过了,版本为0.9.8,此错误好像是openssl-devel开发包里的内容,但用brew install 安装好像并没有找到此包,不知应该如何解决。。。

已经解决,重新用brew install openssl安装了一次openssl,然后指定了openssl的路径。

--with-openssl=/usr/local/opt/openssl

原来试了不行,来回折腾了下,竟然又可以了。

诶,你

--with-openssl

是需要指定openssl的位置的,看你

brew

的位置

直接用brew install php70不行吗?

重新安装openssl的时候,提示这个

A CA file has been bootstrapped using certificates from the system

keychain. To add additional certificates, place .pem files in

/usr/local/etc/openssl/certs

and run

/usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local.

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

Generally there are no consequences of this for you. If you build your

own software and it requires this formula, you'll need to add to your

build variables:

LDFLAGS:  -L/usr/local/opt/openssl/lib

CPPFLAGS: -I/usr/local/opt/openssl/include

感觉着应该是这个问题的.

最后

以上就是迅速月饼为你收集整理的mac os x 10.11 php7,mac osx 10.11.2安装PHP7提示“configure: error: libcrypto not found!”的全部内容,希望文章能够帮你解决mac os x 10.11 php7,mac osx 10.11.2安装PHP7提示“configure: error: libcrypto not found!”所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(71)

评论列表共有 0 条评论

立即
投稿
返回
顶部