使用composer安装yii2-apidoc包时曝出Your requirements could not be resolved to an installable set of packages.的错误。因为使用的是composer的中国镜像,取消镜像,使用VPN,依然是有这个错误。后来换了种安装方式,解决问题。之前安装使用的是composer require --prefer-dist yiisoft/yii2-apidoc这个指令,现在不使用这个指令。直接在项目composer.json文件中require增加"yiisoft/yii2-apidoc": "~2.0.0",然后执行composer update,恢复使用中国镜像,安装很快完成。
Yii2之yii2-apidoc安装爆Your requirements could not be resolved to an installable set of packages.的解决方案
本文介绍了一种解决使用composer安装yii2-apidoc过程中出现错误的方法。通过修改安装命令并更新composer.json文件成功安装了扩展。

被折叠的 条评论
为什么被折叠?



