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 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。