0
点赞
收藏
分享

微信扫一扫

Composer Your requirements could not be resolved to an installable set of packages


Composer install 时候报错:

Composer update 时候报错:

Your requirements could not be resolved to an installable set of packages

Composer Your requirements could not be resolved to an installable set of packages_php

Problem 1

Root composer json requires topthink/framework 5 1.*, found topthink/framework [v5. 1. 41] in the lock file but not in remote repositories, make sure you av d updating this package to keep the one from the lock file


解决方案一:

composer update --ignore-platform-regs

使用强制安装更新

解决方案二:

更换composer镜像地址;

使用:

"repositories": { 
"packagist": {
"type": "composer",
"url": "https://packagist.phpcomposer.com"
}
}

或者:

"repositories": { 
     "packagist": {
        "type": "composer",
        "url": "https://packagist.org"
    }
}


切换 镜像地址后一般可以解决这个问题;


其他问题 :

出现The "topthink/think-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.1.0")


解决步骤:

①清除composer之前的镜像:composer config -g --unset repos.packagist

②更新thinkPHP版本:composer update topthink/framework  --no-plugins

③重新安装插件:composer update


其他解决方案:

①     切换项目文件夹

②     运行:composer config -g repo.packagist composer https://packagist.org



__________________________________________________________________________________

若有帮助到您,欢迎点击推荐,您的支持是对我坚持最好的肯定(*^_^*)

你要保守你心,胜过保守一切。

作者:刘俊涛的博客​​




举报

相关推荐

0 条评论