欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

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

程序员文章站 2022-04-22 15:48:43
...
==> ./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
configure: error: Cannot find OpenSSL's 

回复内容:

==> ./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

configure: error: Cannot find OpenSSL's 

推荐 PHPBrew

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

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

MAMP你值得拥有

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

xcode-select --install

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

否则, 你就按提示安装.
安装之后就可以了.
相关标签: osx php