Composer install 時候報錯:
Composer update 時候報錯:
Your requirements could not be resolved to an installable set of packages
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
文章來源:劉俊濤的博客歡迎關注公眾號、留言、評論,一起學習。
__________________________________________________________________________________
若有幫助到您,歡迎點擊推薦,您的支持是對我堅持最好的肯定(*^_^*)