首页
博客
WEB插件
执行composer install遇到错误:Your requirements could not be resolved to an installable set of packages
原创
后端
2019-05-30 13:55:05
浏览:1357
>执行composer install遇到错误:Your requirements could not be resolved to an installable set of packages. 这是因为不匹配composer.json要求的版本。 ##### 完整错误如下: ```javascript vagrant@homestead:/usr/share/nginx/html/laravel-blog$ sudocomposerinstall Loadingcomposerrepositorieswithpackage information Installingdependencies (includingrequire-dev) fromlockfile Yourrequirementscouldnot beresolvedto aninstallablesetofpackages. Problem 1 - Installationrequestfor doctrine/instantiator 1.0.3 -> satisfiablebydoctrine/instantiator[1.0.3]. - doctrine/instantiator 1.0.3 requiresphp ~5.3 -> yourPHPversion (7.0.3) doesnot satisfythatrequirement. Problem 2 - doctrine/instantiator 1.0.3 requiresphp ~5.3 -> yourPHPversion (7.0.3) doesnot satisfythatrequirement. - phpunit/phpunit-mock-objects 2.3.0 requiresdoctrine/instantiator ~1.0,>=1.0.1 -> satisfiablebydoctrine/instantiator[1.0.3]. - Installationrequestfor phpunit/phpunit-mock-objects 2.3.0 -> satisfiablebyphpunit/phpunit-mock-objects[2.3.0]. ``` >提示PHP版本,不符合composer.json需要的版本 ##### 解决方法 composer可以设置忽略版本匹配,命令是: ```javascript composer install --ignore-platform-reqs ``` 或 ```javascript composer update --ignore-platform-reqs ```
上一篇:
Laravel 出现 No application encryption key has been specified.
下一篇:
Laravel 数据库迁移 php artisan migrate 出现字段长度过长错误
推荐热文
Laravel 数据库迁移 php artisan migrate 出现字段长度过长错误
Laravel 自定义公共函数的引入
Laravel 出现 No application encryption key has been specified.
eclipse 编辑器 设置自动提示+自动补全