问题
brew安装php7.4报错
1 |
Error: php@7.4 has been disabled because it is a versioned formula! |
解决方法
1 |
brew install shivammathur/php/php@7.4 |
更新 PATH
in .zshrc
:
1 2 3 |
echo 'export PATH="/opt/homebrew/opt/php@7.4/bin:$PATH"' >> ~/.zshrc echo 'export PATH="/opt/homebrew/opt/php@7.4/sbin:$PATH"' >> ~/.zshrc source ~/.zshrc |
检查版本
1 2 3 4 5 |
$ php -v PHP 7.4.33 (cli) (built: Jan 21 2023 06:43:54) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies |
原文连接:解决Error: php@7.4 has been disabled because it is a versioned formula
所有媒体,可在保留署名、
原文连接
的情况下转载,若非则不得使用我方内容。