0

当我尝试使用 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

这是我的终端的屏幕截图:

终端屏幕截图

有没有人对此有解决方案,知道我在网上搜索解决方案没有任何运气

4

1 回答 1

0

如果您要升级,请尝试以下操作:

brew reinstall php70 --without-apache

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

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

遇到类似问题,在这个 GitHub 问题下找到它:https ://github.com/Homebrew/homebrew-php/issues/3283

于 2016-08-17T10:01:23.483 回答