运行make时,来自homebrew安装php的链接器错误

时间:2022-09-19 07:45:20

I'm attempting to install php and php-cgi with Homebrew.

我正在尝试用Homebrew安装php和php-cgi。

brew install https://github.com/ampt/homebrew/raw/php/Library/Formula/php.rb

Using this method returns the following errors.

使用此方法将返回以下错误。

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

I've updated Homebrew, and the XCode command line tools. The only warning brew doctor gives me is that a few Python "config" scripts exist outside my system or Homebrew directories.

我已经更新了Homebrew和XCode命令行工具。brew医生给我的唯一警告是,在我的系统或Homebrew目录之外存在一些Python“配置”脚本。

Anyone know what the issue could be? Where can I look for more detailed error messages?

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

2 个解决方案

#1


1  

I'm not familiar with the ampt tap, when I grabbed php I used the josegonzalez tap. You could try that.

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

$ brew tap josegonzalez/homebrew-php

You can also get more information by using the -vd options to brew install.

您还可以通过使用-vd选项来获得更多信息。

$ brew install -vd https://github.com/ampt/homebrew/raw/php/Library/Formula/php.rb

I just unlinked my 5.3.13 php from josegonzalez and ran the above command. With the -vd I can see the ./configure command run and all the output from it as well as the commands make invokes and compiler output. Whew, this is taking a while to build.

我刚刚从josegonzalez卸载了5.3.13 php并运行了上面的命令。使用-vd,我可以看到./configure命令运行,以及它的所有输出,以及调用和编译器输出的命令。哇,这需要一段时间。

It does fail for me with this output

这个输出对我来说是失败的。

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

Looks like the Formula never creates ${prefix}/etc. I blame the formula. Try josegonzalez tap.

看起来公式从不创建${前缀}/等等。我责怪的公式。尝试josegonzalez水龙头。

$ rm /Library/Caches/Homebrew/Formula/php.rb 
$ brew tap jozegonzalez/homebrew-php
$ brew install php53

#2


0  

As a comment on homebrew-php repository just force link libxml2

作为对homebrew-php存储库的注释,只需强制链接libxml2

brew link libxml2 --force

#1


1  

I'm not familiar with the ampt tap, when I grabbed php I used the josegonzalez tap. You could try that.

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

$ brew tap josegonzalez/homebrew-php

You can also get more information by using the -vd options to brew install.

您还可以通过使用-vd选项来获得更多信息。

$ brew install -vd https://github.com/ampt/homebrew/raw/php/Library/Formula/php.rb

I just unlinked my 5.3.13 php from josegonzalez and ran the above command. With the -vd I can see the ./configure command run and all the output from it as well as the commands make invokes and compiler output. Whew, this is taking a while to build.

我刚刚从josegonzalez卸载了5.3.13 php并运行了上面的命令。使用-vd,我可以看到./configure命令运行,以及它的所有输出,以及调用和编译器输出的命令。哇,这需要一段时间。

It does fail for me with this output

这个输出对我来说是失败的。

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

Looks like the Formula never creates ${prefix}/etc. I blame the formula. Try josegonzalez tap.

看起来公式从不创建${前缀}/等等。我责怪的公式。尝试josegonzalez水龙头。

$ rm /Library/Caches/Homebrew/Formula/php.rb 
$ brew tap jozegonzalez/homebrew-php
$ brew install php53

#2


0  

As a comment on homebrew-php repository just force link libxml2

作为对homebrew-php存储库的注释,只需强制链接libxml2

brew link libxml2 --force