0

When I try to install PHP7 with Homebrew I get this error

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

And the command I've used to install it is :

brew install homebrew/php/php70

Here's a screenshot of my terminal:

Terminal Screen shot

Does any one have a solution for this, knowing that I've searching the web for a solution without any luck

R.Saif
  • 11
  • 1
  • 6

1 Answers1

0

Try this if you're upgrading:

brew reinstall php70 --without-apache

otherwise if you're installing php70 for the first time, try the following::

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

Faced a similar issue, found it under this GitHub issue: https://github.com/Homebrew/homebrew-php/issues/3283

Jim
  • 2,974
  • 2
  • 19
  • 29
daliso
  • 262
  • 4
  • 10