为了账号安全,请及时绑定邮箱和手机立即绑定

使用国内composer镜像安装项目报错

使用国内composer镜像安装项目报错

蓝山帝景 2019-03-30 11:35:17
其实从来没用comopser安装成功过。问题和过程如下:1、在windows上用http://docs.phpcomposer.com/Composer-Setup.exe安装composer2、Wamp、php都已经安装好openssl也打开。3、新建一个目录,里面放了composer.json,内容如下:{"name":"karpoff/yii2-crop-image-upload","description":"Yii2Cropimageuploadwidget","homepage":"https://github.com/karpoff/yii2-crop-image-upload","license":"BSD-3-Clause","type":"yii2-extension","version":"0.0.1","keywords":["yii2","crop","image","upload"],"authors":[{"name":"AntonKarpov","email":"karpoff@bk.ru"}],"autoload":{"psr-4":{"karpoff\\icrop\\":""}},"require":{"yiisoft/yii2":"*","yiisoft/yii2-imagine":"*","mongosoft/yii2-upload-behavior":"*"},"repositories":[{"type":"composer","url":"http://pkg.phpcomposer.com/repo/packagist/"},{"packagist":false}]}4、然后右键点击,选"ComposerInstall",报错:Yourrequirementscouldnotberesolvedtoaninstallablesetofpackages.Problem1-yiisoft/yii22.0.1requiresbower-asset/jquery2.1.*@stable|1.11.*@stable->nomatchingpackagefound.-yiisoft/yii22.0.0requiresbower-asset/jquery2.1.*@stable|1.11.*@stable->nomatchingpackagefound.-yiisoft/yii22.0.1requiresbower-asset/jquery2.1.*@stable|1.11.*@stable->nomatchingpackagefound.-yiisoft/yii22.0.0requiresbower-asset/jquery2.1.*@stable|1.11.*@stable->nomatchingpackagefound.-Installationrequestforyiisoft/yii2*->satisfiablebyyiisoft/yii2[2.0.0,2.0.1].Potentialcauses:-Atypointhepackagename-Thepackageisnotavailableinastable-enoughversionaccordingtoyourminimum-stabilitysettingseeformoredetails.Readforfurthercommonproblems.5、求安慰
查看完整描述

2 回答

?
函数式编程

TA贡献1807条经验 获得超9个赞

你漏装了fxp/composer-asset-plugin
composer装上这个就行了
仔细看教程啊。。。
                            
查看完整回答
反对 回复 2019-03-30
?
慕桂英3389331

TA贡献2036条经验 获得超8个赞

composerglobalrequire"fxp/composer-asset-plugin:~1.1.1"这是具体的执行命令
                            
查看完整回答
反对 回复 2019-03-30
  • 2 回答
  • 0 关注
  • 561 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信