博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
解决使用composer出现的错误
阅读量:4030 次
发布时间:2019-05-24

本文共 2536 字,大约阅读时间需要 8 分钟。

解决使用composer出现的错误
第一次使用composer ,因为yii项目必须要用到,然而·····
composer install / update 会报如下错误:
F:\xxx\www\yii_blog>composer install
You are running composer with xdebug enabled. This has a major impact
on
runtime performance. 
See https:
//getcomposer.org/xdebug
Loading composer repositories with package informationInstalling dependencies (including require-dev) from lock
file
Warning: The lock
file
is not up to date with the latest changes
in
composer.jso
n
.
You may be getting outdated dependencies.
Run
update
to
update
them.Your requirements could not be resolved to
an
installable
set
of packages.
Problem 1
- Installation request
for
fxp/composer-asset-
plugin
v1.0.0-beta4 -> satisfiable
by
fxp/composer-asset-
plugin
[v1.0.0-beta4]. - fxp/composer-asset-
plugin
v1.0.0-beta4 requires composer-
plugin
-api 1.0.0->
no
matching package found.
Problem 2
- Installation request
for
yiisoft/yii2-composer 2.0.3 -> satisfiable
by
yiisoft/yii2-composer[2.0.3].
- yiisoft/yii2-composer 2.0.3 requires composer-
plugin
-api 1.0.0 ->
no
match
ing package found.
Problem 3
- yiisoft/yii2-composer 2.0.3 requires composer-
plugin
-api 1.0.0 ->
no
match
ing package found.
- yiisoft/yii2 2.0.3 requires yiisoft/yii2-composer * -> satisfiable
by
yiisoft/yii2-composer[2.0.3].
- Installation request
for
yiisoft/yii2 2.0.3 -> satisfiable
by
yiisoft/yii2[2.0.3].Potential causes: - A typo
in
the package name - The package is not available
in
a stable-enough
version
according to your
min
imum-stability setting
see <https:
//getcomposer.org/doc/04-schema.md#minimum-stability> for more det
ails.
Read
<https:
//getcomposer.org/doc/articles/troubleshooting.md> for further commo
n
problems.
```````````````````````````````````````````````````````````````````````````````````````````````````````````
 
经过了一番的几小时的摸索,于是我开始了我的报错解决之道:
step0:
安装composer:
要么
①下载composer.phar 要么②安装composer install.exe for windows
step1:
Yii2 需要 
composer-plugin-api 1.0
 以上的版本

檢查 
composer-asset-plugin
 的版本或者查看一下有無安裝, 先確定有沒有或者有沒有超過1.0以上

如果都沒有的話使用 
composer global require "fxp/composer-asset-plugin:~1.1.1"
 去下載,
 
[http://www.yiichina.com/topic/6216]
step3:
启用Packagist镜像
系统全局配置: 即将配置信息添加到 Composer 的全局配置文件 config.json 中。
composer config -g repo.packagist composer https://packagist.phpcomposer.com
[http://pkg.phpcomposer.com/] 
step4:
安装fxp/composer-asset-plugin
:
composer require fxp/composer-asset-plugin
这时候中间会提示需要输入一个token:
 
并且:记住命令行要求github的token:
 所以去github:
 得到token后,复制过来
 等待安装
fxp/composer-asset-plugin
完成后是这样的:
 
[https://packagist.org/packages/fxp/composer-asset-plugin
]
你可能感兴趣的文章
NSNotificationCenter 用法总结
查看>>
C primer plus 基础总结(一)
查看>>
剑指offer算法题分析与整理(一)
查看>>
剑指offer算法题分析与整理(三)
查看>>
部分笔试算法题整理
查看>>
Ubuntu 13.10使用fcitx输入法
查看>>
pidgin-lwqq 安装
查看>>
mint/ubuntu安装搜狗输入法
查看>>
C++动态申请数组和参数传递问题
查看>>
opencv学习——在MFC中读取和显示图像
查看>>
retext出现Could not parse file contents, check if you have the necessary module installed解决方案
查看>>
pyQt不同窗体间的值传递(一)——对话框关闭时返回值给主窗口
查看>>
linux mint下使用外部SMTP(如网易yeah.net)发邮件
查看>>
北京联通华为光猫HG8346R破解改桥接
查看>>
python使用win32*模块模拟人工操作——城通网盘下载器(一)
查看>>
python append 与浅拷贝
查看>>
Matlab与CUDA C的混合编程配置出现的问题及解决方案
查看>>
2017阿里内推笔试题--算法工程师(运筹优化)
查看>>
python自动化工具之pywinauto(零)
查看>>
python一句话之利用文件对话框获取文件路径
查看>>