dqvrlgi3247 2018-06-09 16:38
浏览 44

使用Homebrew的MacOS Sierra PHP安装无法使用自制的php

I recently got my hands on a new macbook and I'm loving the terminal! I'm now configuring my enviroment to run completely on homebrew and on different php versions. To do this, I am following this guide: https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions

Everything works up to the point of

brew unlink php@7.2 && brew link --force --overwrite php@5.6

When I do this I get no error message and everything is OK, however, the guide says that I have to check with php -v to see which version is running and it is NOT php 5.6...

PHP 7.1.16 (cli) (built: Apr  1 2018 13:14:42) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

Is the message I get back.

When I run which php:

/usr/local/bin/php

What I have tried

Restarting apache

removing everything regarding php from /usr/local/php-*

checking brew, both php 5.6 and apache are running

Could anyone help me? Thank you for your time!

EDIT (FIXED): Restarted my Mac and then the brew PHP installation went trough ^^

  • 写回答

1条回答 默认 最新

  • doulei2100 2018-06-10 18:58
    关注

    You just need to open new shell tab / window. You don't have to restart macOS :)

    评论

报告相同问题?

悬赏问题

  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试