使用brew将PHP更新到7.4 macOS Catalina [英] Update PHP to 7.4 macOS Catalina with brew

查看:74
本文介绍了使用brew将PHP更新到7.4 macOS Catalina的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试通过brew在macOS Catalina上将PHP版本更新为 7.4 .

I try to update my PHP version to 7.4 on macOS Catalina with brew.

我做了 brew安装php@7.4

如果我检查自己的版本 php -v ,仍然看到旧版本的 PHP 7.3.11 ?

If I check my version php -v, I still see the old version PHP 7.3.11?

我该怎么办?

更新:

brew医生之后,我得到了:

警告:在您的PATH中找不到Homebrew的垃圾桶,但您有将可执行文件放在/usr/local/sbin中的已安装公式.考虑像这样设置PATH:echo'exportPATH ="/usr/local/sbin:$ PATH"">>〜/.profile

Warning: Homebrew's sbin was not found in your PATH but you have installed formulae that put executables in /usr/local/sbin. Consider setting the PATH for example like so: echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.profile

推荐答案

尝试:

brew update
brew upgrade php
php -v
brew services start php

brew services restart php

如果您使用apache服务器:

if you use apache server:

sudo apachectl restart

如果您使用ngnix

if you use ngnix

sudo nginx -s reload

brew unlink php@7.3
brew link php@7.4

这篇关于使用brew将PHP更新到7.4 macOS Catalina的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆