Composer php 安装yii2时出现异常

Composer php 安装yii2时出现异常,composer-php,yii2,Composer Php,Yii2,当我尝试使用composer安装Yii2时 我有一个例外 Script yii\composer\Installer::postCreateProject handling the post-create-project-cmd event terminated with an exception [Exception] The mcrypt PHP extension is required by Yii2.

当我尝试使用composer安装Yii2时

我有一个例外

Script yii\composer\Installer::postCreateProject handling the post-create-project-cmd event terminated with an exception

  [Exception]                                    
  The mcrypt PHP extension is required by Yii2.  

如何解决这个问题?

您必须先将mycrypt安装到php

请参阅下面的链接:
您必须首先将mycrypt安装到php

请参阅下面的链接:

即使我的机器上已经安装了mcrypt,我也会收到该错误消息。我只是忽略它,项目工作正常…即使我的机器上已经安装了mcrypt,我也会收到错误消息。我只是忽略了它,项目运行良好…运行php5enmod mcrypt;服务apache2 restartRun php5enmod mcrypt;服务apache2重新启动