首页 > 解决方案 > php8 “502 bad gateway” 安装 brew 的 MacOS 上的 php-fpm 在哪里

问题描述

大家好,

标题围绕着这个问题。

我得到了从 php@7.4 到 php(8 版本)的全新 brew 升级,并且当我重新启动 nginx 时!得到一个“502 坏网关”

我试过了:php-fpm --version得到了

WARNING: PHP is not recommended
PHP is included in macOS for compatibility with legacy software.
Future versions of macOS will not include PHP.
PHP 7.3.29-to-be-removed-in-future-macOS (fpm-fcgi) (built: Aug 30 2021 10:56:58)
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.29, Copyright (c) 1998-2018 Zend Technologies

我找不到brew link类似brew link phpphp-fpm的东西

Error: No such keg: /usr/local/Cellar/php-fpm

请你能告诉我我哪里错了吗?

编辑

我愿意brew doctor

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

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

然后source ~/.zshrc

php-fpm -v                                                                                                                                                                                              
PHP 8.0.11 (fpm-fcgi) (built: Oct 13 2021 06:45:39)
Copyright (c) The PHP Group
Zend Engine v4.0.11, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.11, Copyright (c), by Zend Technologies

好的,但不要解决我的“502”:-(

标签: phpmacoshomebrew

解决方案


推荐阅读