返回

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

发布时间:2022-10-13 19:50:48 362

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)
按点赞数排序
用户头像
精选文章
thumb 中国研究员首次曝光美国国安局顶级后门—“方程式组织”
thumb 俄乌线上战争,网络攻击弥漫着数字硝烟
thumb 从网络安全角度了解俄罗斯入侵乌克兰的相关事件时间线
下一篇
Request::param 变量修饰符 2022-10-13 19:23:57