Skip to content
Advertisement

Unable to install PHP 7 with Homebrew on macOS Sierra

I’m trying to setup Laravel’s Valet which, as a dependency, requires PHP 7. When I try to install PHP 7 with Homebrew I get the following error:

JavaScript

This is on a fresh install of MacOS Sierra (actual release, not a beta) with a fresh install of Homebrew (updated). I have installed, ran and agreed to the Xcode licensing agreement.

I have no idea what these errors mean. How can I fix them?

Advertisement

Answer

Right I’ve figured it out. I’m posting the steps to successfully install the require components below in case anybody else stumbles upon this issue:

1). make sure Homebrew is up to date:

JavaScript

2). Fix the PHP 7 error by making sure Xcode is installed and then typing the following into the Terminal:

JavaScript

3). Run the following command (otherwise the PHP installation will complain about missing libz):

JavaScript

4). You can now install PHP 7 with Homebrew:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement