Why cant I run bin/behat?

时间:2016-04-21 21:56:20

标签: php terminal composer-php behat

I am trying to run behat on my vendor folder. I have installed composer globally, have installed the behat package, but every time I run bin/behat I keep getting this message from composer

You must set up the project dependencies, run the following commands:
curl -s http://getcomposer.org/installer | php
php composer.phar install

I am not sure how to fix this. I see the files are in the vendor folder, and when I type "composer" on the terminal, I see the manual.

If anyone can help me resolve this I would really appreciate it. Thanks!

1 个答案:

答案 0 :(得分:0)

导致这种情况有几个可能的问题:

  1. 确保composer中已安装$PATH。也就是说,在命令提示符下运行composer应该有效,并且您不需要运行像~/Downloads/composer.phar这样的显式路径
  2. 执行composer install指令,如错误消息所示。常见的错误是消息

      

    需要Mcrypt PHP扩展

    在这种情况下,您需要安装指定的扩展名。例如,Mac上的brew install php56-mcrypt或Ubuntu上的sudo apt-get install php5-mcrypt