>백엔드 개발 >PHP 튜토리얼 >在 Mac OSX 上搭建 PHP 开发环境时遇到了异常(用 brew 安装 php 5.5 时) ?

在 Mac OSX 上搭建 PHP 开发环境时遇到了异常(用 brew 安装 php 5.5 时) ?

WBOY
WBOY원래의
2016-06-06 20:40:061213검색

==> ./configure --prefix=/usr/local/Cellar/php55/5.5.19 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.5 --with-config-file-path=/usr/local/
checking for krb5-config... /usr/bin/krb5-config
checking for DSA_get_default_method in -lssl... no
checking for X509_free in -lcrypto... yes
checking for pkg-config... no

<code>configure: error: Cannot find OpenSSL's <evp.h>
</evp.h></code>

回复内容:

==> ./configure --prefix=/usr/local/Cellar/php55/5.5.19 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.5 --with-config-file-path=/usr/local/
checking for krb5-config... /usr/bin/krb5-config
checking for DSA_get_default_method in -lssl... no
checking for X509_free in -lcrypto... yes
checking for pkg-config... no

<code>configure: error: Cannot find OpenSSL's <evp.h>
</evp.h></code>

推荐 PHPBrew

<code>sudo ln -s /Applications/Xcode6-Beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include /usr/include
</code>

via: https://github.com/Homebrew/homebrew-php/issues/1181

MAMP你值得拥有

mac 一般自带php的环境,是不是冲突了

<code>xcode-select --install

正确的结果应该是
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

否则, 你就按提示安装.
安装之后就可以了.
</code>
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.