Huseyin Cakar
Huseyin Cakar

Reputation: 61

Error with brew install [email protected]. I cannot solve unexpected /Formula/php.rb error?

When i run brew install [email protected] i got this error below.

Error: [email protected]: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Aliases/[email protected]:1: syntax error, unexpected ..
../Formula/php.rb
^~
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Aliases/[email protected]:1: unknown regexp options - php
ALT01979:Homebrew hc641j$ 
brew install [email protected]

gives this error below.

Error: No available formula with the name "[email protected]" 
==> Searching for a previously deleted formula (in the last month)...
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...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

when i try install php it works but i need to install specifically 7.4.

Upvotes: 2

Views: 5478

Answers (1)

chenrui
chenrui

Reputation: 9866

homebrew-core does not have an alias for [email protected], that is why you cannot do brew install [email protected], but you should be able to do brew install php to install php 7.4.10

version check test:

$ php --version
PHP 7.4.10 (cli) (built: Sep  3 2020 18:19:30) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.10, Copyright (c), by Zend Technologies

Upvotes: 2

Related Questions