Reputation: 1
I'm trying to install PHP 7.1 on my Mac using Brew. I do not have any version of PHP other than what Apple installs as default.
I've run the following commands (based on various posts) to install PHP 7.1:
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
When I run the brew tap for homebrew-php I get the following messages (copied from terminal). Can anyone suggest what I need to do?
brew tap homebrew/homebrew-php
==> Tapping homebrew/php
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-php'...
remote: Counting objects: 757, done.
remote: Compressing objects: 100% (512/512), done.
remote: Total 757 (delta 505), reused 305 (delta 236), pack-reused 0
Receiving objects: 100% (757/757), 306.08 KiB | 0 bytes/s, done.
Resolving deltas: 100% (505/505), done.
Checking out files: 100% (748/748), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/Formula/deployer.rb
invalid attribute for formula 'homebrew/php/deployer': version (nil)
Error: Cannot tap homebrew/php: invalid syntax in tap!
Upvotes: 0
Views: 2409
Reputation: 1
I realized I needed to add homebrew/php
to my repositories then I was able to run brew install homebrew/php/php71
and it worked. I have to wonder if I might had a typo. Either way, it installed a bunch of dependencies and it just worked.
Upvotes: 0
Reputation: 91
You can try:
brew search php7
A list of available php extensions will be listed to you. To install php7.1 you can use:
brew install homebrew/php/php71
Upvotes: 1