运行make时,homebrew安装php时出现链接器错误

运行make时,homebrew安装php时出现链接器错误,php,macos,installation,makefile,homebrew,Php,Macos,Installation,Makefile,Homebrew,我正在尝试用自制软件安装php和php cgi brew install https://github.com/ampt/homebrew/raw/php/Library/Formula/php.rb 使用此方法将返回以下错误 ==> make clang: clangerror: : linker command failed with exit code 1 (use -v to see invocation)error: linker command failed with ex

我正在尝试用自制软件安装php和php cgi

brew install https://github.com/ampt/homebrew/raw/php/Library/Formula/php.rb
使用此方法将返回以下错误

==> make
clang: clangerror: : linker command failed with exit code 1 (use -v to see invocation)error: 
linker command failed with exit code 1 (use -v to see invocation)
make: *** [sapi/cli/php] Error 1
make: *** Waiting for unfinished jobs....
make: *** [sapi/cgi/php-cgi] Error 1
我已经更新了自制软件和XCode命令行工具。brew doctor给我的唯一警告是,在我的系统或自制目录之外存在一些Python“config”脚本


有人知道问题是什么吗?我在哪里可以找到更详细的错误消息?

我不熟悉ampt tap,当我抓取php时,我使用了josegonzalez tap。你可以试试

$ brew tap josegonzalez/homebrew-php
您还可以通过使用-vd选项进行brew安装来获取更多信息

$ brew install -vd https://github.com/ampt/homebrew/raw/php/Library/Formula/php.rb
我刚刚将我的5.3.13 php与josegonzalez断开链接,然后运行上面的命令。使用-vd,我可以看到./configure命令运行,它的所有输出以及命令进行调用和编译器输出。哇,这需要一段时间来建立

对于我来说,这个输出确实失败了

==> cp ./php.ini-production /usr/local/Cellar/php/5.3.10/etc/php.ini
cp ./php.ini-production /usr/local/Cellar/php/5.3.10/etc/php.ini 
cp: /usr/local/Cellar/php/5.3.10/etc/php.ini: No such file or directory
/usr/local/Library/Homebrew/formula.rb:553:in `system
看起来该公式从未创建${prefix}/等。我责备该公式。试试josegonzalez水龙头

$ rm /Library/Caches/Homebrew/Formula/php.rb 
$ brew tap jozegonzalez/homebrew-php
$ brew install php53
作为一个在自制php存储库上的应用程序,只需强制链接libxml2即可

brew link libxml2 --force

非常感谢。我自己得出了这个结论。