使用Homebrew安装PHP70时出错

时间:2016-07-31 00:08:11

标签: homebrew php-7 laravel-valet

当我尝试使用Homebrew安装PHP7时出现此错误

Sorry, I cannot run apxs.  Possible reasons follow:

1. Perl is not installed
2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page is displayed)

The output of /usr/sbin/apxs follows:
apxs:Error: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config not found!.

configure: error: Aborting

我用来安装它的命令是:

brew install homebrew/php/php70

这是我的终端的截图:

Terminal Screen shot

有没有人有这方面的解决方案,知道我在网上搜索没有运气的解决方案

1 个答案:

答案 0 :(得分:0)

如果您正在升级,请尝试此操作:

brew reinstall php70 --without-apache

否则,如果您是第一次安装php70,请尝试以下::

brew install home-brew/php/php70 --without-apache

面对类似的问题,在此GitHub问题下找到了它:https://github.com/Homebrew/homebrew-php/issues/3283