开发者社区> 问答> 正文

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)

Installing yiisoft/yii2-app-basic (2.0.8)
Loading from cache
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

yiisoft/yii2 2.0.8 requires bower-asset/jquery 2.2.@stable | 2.1.@stable | 1.11.*@stable -> no matching package found.
yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.@stable | 2.1.@stable | 1.11.*@stable -> no matching package found.
yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.@stable | 1.11.@stable -> no matching package found.
yiisoft/yii2 2.0.5 requires bower-asset/jquery 2.1.@stable | 1.11.@stable -> no matching package found.
Installation request for yiisoft/yii2 >=2.0.5 -> satisfiable by yiisoft/yii2[2.0.5, 2.0.6, 2.0.7, 2.0.8].
Potential causes:

A typo in the package name
The package is not available in a stable-enough version according to your minimum-stability setting
see https://getcomposer.org/doc/04-schema.md#minimum-stability for more details.
Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

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

展开
收起
a123456678 2016-06-28 11:29:30 2972 0
1 条回答
写回答
取消 提交回答
  • 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
    即可安装。

    2019-07-17 19:48:07
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Alibaba Cloud Linux 3 发布 立即下载
ECS系统指南之Linux系统诊断 立即下载
ECS运维指南 之 Linux系统诊断 立即下载