作曲家要求 - 找不到匹配版本的包
每当我运行composer require [package name]时,我都会得到这样的信息:
composer require usmanhalalit/laracsv
[InvalidArgumentException]
Could not find a matching version of package usmanhalalit/laracsv. Check the package spelling, your version constraint and that the package is available in a stability which matches yo
ur minimum-stability (dev).
require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>]...
我在任何包中都会收到此消息,因此这不仅仅是usmanhalalit/laracsv的问题。如果我直接在composer.json中声明包+版本,然后运行composer update,我也会收到消息。
作曲家诊断: (我已确保获得最新的稳定版本的composer。)
$ composer diagnose
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 2.2.9
PHP version: 7.2.0 - Package overridden via config.platform, actual: 7.3.8
PHP binary path: /Applications/MAMP/bin/php/php7.3.8/bin/php
OpenSSL version: OpenSSL 1.0.2o 27 Mar 2018
cURL version: 7.65.1 libz 1.2.8 ssl OpenSSL/1.0.2o
zip: extension present, unzip present, 7-Zip not available
这是我的composer.json
{
"name": "laravel/lumen",
"description": "The Laravel Lumen Framework",
"type": "project",
"license": "MIT",
"autoload": {
"psr-4": {
"Laravel\\Lumen\\": "app/"
}
},
"minimum-stability": "dev",
"require": {
}
}
有谁知道为什么会发生这种情况?
编辑:
根据要求,这是我的全局 config.json。
{
"config": {
"platform": {
"php": "7.2.0"
},
"disable-tls": false},
"repositories": {
"packagist": false
}
}
Whenever I run composer require [package name] I get this:
composer require usmanhalalit/laracsv
[InvalidArgumentException]
Could not find a matching version of package usmanhalalit/laracsv. Check the package spelling, your version constraint and that the package is available in a stability which matches yo
ur minimum-stability (dev).
require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>]...
I get this message with any package so it's not just an issue with usmanhalalit/laracsv. I also get the message if I declare the package + version directly in composer.json and then run composer update.
Composer diagnose:
(I've made sure to get the latest stable version of composer.)
$ composer diagnose
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 2.2.9
PHP version: 7.2.0 - Package overridden via config.platform, actual: 7.3.8
PHP binary path: /Applications/MAMP/bin/php/php7.3.8/bin/php
OpenSSL version: OpenSSL 1.0.2o 27 Mar 2018
cURL version: 7.65.1 libz 1.2.8 ssl OpenSSL/1.0.2o
zip: extension present, unzip present, 7-Zip not available
This is my composer.json
{
"name": "laravel/lumen",
"description": "The Laravel Lumen Framework",
"type": "project",
"license": "MIT",
"autoload": {
"psr-4": {
"Laravel\\Lumen\\": "app/"
}
},
"minimum-stability": "dev",
"require": {
}
}
Does anyone know why this would be happening?
EDIT:
As requested, here is my global config.json.
{
"config": {
"platform": {
"php": "7.2.0"
},
"disable-tls": false},
"repositories": {
"packagist": false
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论