On macOS High Sierra, I have the default php working fine.

$ php --version
PHP 7.1.7 (cli) (built: Jul 15 2017 18:08:09) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

Now, trying to install Zend OPcache

$ brew install php71-opcache --build-from-source
Error: No available formula with the name "php71-opcache" 
==> Searching for a previously deleted formula...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
==> Searching for similarly named formulae...
==> Searching local taps...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

Is there a way to do this with brew? or other way?

  • How was PHP 7.1.7 installed on your machine? Did you install PHP with brew tap homebrew/php then brew update then brew install php71? – JakeGould Dec 12 '17 at 17:54
  • thanks Jake. I guess it came with macOS High Sierra . I didn't install with homebrew. – bsreekanth Dec 12 '17 at 23:03
  • 1
    If that is the case, I would recommend just running brew tap homebrew/php and then brew install php71. – JakeGould Dec 12 '17 at 23:38

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.