作曲家错误[UnexpectedValueException] [英] Composer error [UnexpectedValueException]
问题描述
我尝试安装composer并收到以下错误。有人知道这是什么意思吗?
I tried composer install and got the following error. Anyone know what it means?
[UnexpectedValueException]
无法解析版本约束所需:无效的版本字符串
需要
[UnexpectedValueException]
Could not parse version constraint Needed: Invalid version string "Needed"
安装[--prefer-source] [--prefer-dist] [--dry-run] [--dev]
[--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader]
[--no-scripts] [--no-progress] [ -v | vv | vvv | --verbose]
[-o | --optimize-autoloader] [-a | --classmap-authoritative]
[--ignore-platform-reqs] [- -] [] ...
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] []...
我所有的composer.json都在其中:
All my composer.json has in it is this:
{
"require" : {
"facebook/php-sdk-v4" : "4.0.*",
"league/oauth2-client": "Needed for Gmail's XOAUTH2 authentication system"
}
}
推荐答案
无法解析版本约束所需:无效的版本字符串
需要
Could not parse version constraint Needed: Invalid version string "Needed"
您需要一个包裹版本号而不是字符串 Gmail的XOAUTH2身份验证系统需要。
You need a package version number and not the string 'Needed for Gmail's XOAUTH2 authentication system'.
例如:
{
"require" : {
"facebook/php-sdk-v4" : "4.0.*",
"league/oauth2-client": "1.1.0"
}
}
这篇关于作曲家错误[UnexpectedValueException]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!