簡體   English   中英

brew install php@7.4 出錯。 我無法解決意外的 /Formula/php.rb 錯誤?

[英]Error with brew install php@7.4. I cannot solve unexpected /Formula/php.rb error?

當我運行brew install php@7.4出現以下錯誤。

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

下面給出了這個錯誤。

Error: No available formula with the name "php@7.4.10" 
==> 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.

當我嘗試安裝 php 時,它可以工作,但我需要專門安裝 7.4。

homebrew-core 沒有 php@7.4 的別名,這就是為什么你不能做brew install php@7.4 ,但你應該能夠做brew install php來安裝 php 7.4.10

版本檢查測試:

$ 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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM