duankeng9477 2015-12-10 07:54
浏览 169

ln:/ usr / bin / php:操作不允许OSX 10.11

I use PHPStorm on OSX with PHPUnit and Laravel.

When I go inside my project from the PHPStorm console and type:

$ php --version

PHP 5.5.29 (cli) (built: Sep  9 2015 00:26:40) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies

$ which php

/usr/bin/php

From my terminal:

$ php --version

PHP 5.6.16 (cli) (built: Nov 27 2015 21:37:15) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans

$ which php

/usr/local/php5/bin/php

The above I installed. I have edited my PATH to use it.

Now I want to change the PHP version inside my PHPStorm.

I tried editing composer.json:

"require": {
    "php": ">=5.6.16",

and then running update:

$ composer update

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - This package requires php >=5.6.16 but your PHP version (5.5.29) does not satisfy that requirement.

I also tried to create a symbolic link .

$ sudo ln -s /usr/local/php5/bin/php /usr/bin/php

It fails with:

ln: /usr/bin/php: Operation not permitted

I am not sure what to do. I would like to update Php to 5.6.16.

  • 写回答

1条回答 默认 最新

  • douxian6086 2015-12-10 08:33
    关注

    It appears you have at least two versions of Php installed.

    Try changing the interpreter path within PhpStorm.

    File->settings->languages & frameworks->interpreter ...

    评论

报告相同问题?

悬赏问题

  • ¥15 uniapp连接阿里云无法发布消息和订阅
  • ¥25 麦当劳点餐系统代码纠错
  • ¥15 轮班监督委员会问题。
  • ¥15 基于作物生长模型下,有限水资源的最大化粮食产量的资源优化模型建立
  • ¥20 关于变压器的具体案例分析
  • ¥15 生成的QRCode圖片加上下載按鈕
  • ¥15 板材切割优化算法,数学建模,python,lingo
  • ¥15 科来模拟ARP欺骗困惑求解
  • ¥100 iOS开发关于快捷指令截屏后如何将截屏(或从截屏中提取出的文本)回传给本应用并打开指定页面
  • ¥15 unity连接Sqlserver