linux 使用composer 安装yii2框架报错
PHP中文网
PHP中文网 2017-04-17 14:54:42
[Linux讨论组]

使用 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权限;
是什么原因,怎么解决;

PHP中文网
PHP中文网

认证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

即可安装。

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号