1. 程式人生 > 其它 >Composer 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

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"

    }

}

切換 映象地址後一般可以解決這個問題;

文章來源:劉俊濤的部落格歡迎關注公眾號、留言、評論,一起學習。

__________________________________________________________________________________

若有幫助到您,歡迎點選推薦,您的支援是對我堅持最好的肯定(*^_^*)

耶和華是我的牧者,我必不至缺乏。