MacOS 安装PHP8.0 提示找不到 “zsh: command not found: php” – MasterH's Grocery Store

MacOS 安装PHP8.0 提示找不到 “zsh: command not found: php”

首先安装Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

其次安装php8.0

brew install php@8.0

检查php安装情况

php -v

file
如果提示上面的错误,则需要重新进行连接
命令如下

brew tap shivammathur/php
brew link --overwrite --force php@8.0

file
查看php版本,正常显示

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *