当前位置:   article > 正文

mac安装php7.2_mac上安装php7.2

mac上安装php7.2
brew install php@7.2

brew安装提示失败

Error: php@7.2 has been disabled because it is deprecated upstream!

原来是brew已经不支持7.2了,只有用其他办法来安装

  1. brew tap shivammathur/php
  2. brew install shivammathur/php/php@7.2

安装完成提示

  1. The php.ini and php-fpm.ini file can be found in:
  2. /usr/local/etc/php/7.2/
  3. php@7.2 is keg-only, which means it was not symlinked into /usr/local,
  4. because this is an alternate version of another formula.
  5. If you need to have php@7.2 first in your PATH, run:
  6. echo 'export PATH="/usr/local/opt/php@7.2/bin:$PATH"' >> ~/.zshrc
  7. echo 'export PATH="/usr/local/opt/php@7.2/sbin:$PATH"' >> ~/.zshrc
  8. For compilers to find php@7.2 you may need to set:
  9. export LDFLAGS="-L/usr/local/opt/php@7.2/lib"
  10. export CPPFLAGS="-I/usr/local/opt/php@7.2/include"
  11. To restart shivammathur/php/php@7.2 after an upgrade:
  12. brew services restart shivammathur/php/php@7.2
  13. Or, if you don't want/need a background service you can just run:
  14. /usr/local/opt/php@7.2/sbin/php-fpm --nodaemonize
  15. ————————————————
  16. 版权声明:本文为CSDN博主「fangdong88」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
  17. 原文链接:https://blog.csdn.net/fangdong88/article/details/125414034

根据上面提示启动即可

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/木道寻08/article/detail/753101
推荐阅读
相关标签
  

闽ICP备14008679号