首页 > linux 使用composer 安装yii2框架报错

linux 使用composer 安装yii2框架报错

使用 composer create-project yiisoft/yii2-app-basic yii2
报下面错误,
Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted
Installing yiisoft/yii2-app-basic (2.0.8)

Created project in yii2
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1

Potential causes:

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

登陆的是root权限;
是什么原因,怎么解决;


yii2使用了composer asset plugin来管理需要的bower和npm模块,在安装之前需要先使用下面命令安装composer asset plugin

composer global require "fxp/composer-asset-plugin:~1.1.1"

然后再

composer create-project yiisoft/yii2-app-basic yii2

即可安装。

【热门文章】
【热门文章】