gpt4 book ai didi

PHP Composer "no matching package found"(魔族 PHP API)

转载 作者:搜寻专家 更新时间:2023-10-31 21:09:10 25 4
gpt4 key购买 nike

我正在尝试启动并运行 Mozu PHP API,它依赖于 Composer 来获取所需的库。 Composer 不断失败的需求测试如下:

Composer 文件:

cat composer.json
{
"name" : "mozu/api",
"description" : "SDK for Mozu Rest APIs",
"type" : "library",
"homepage" : "https://developer.mozu.com/sdks",
"keywords" : [
"Mozu",
"API",
"SDK"
],
"license" : "MIT",
"require" : {
"guzzle/guzzle" : ">=3.7.3@stable",
"php" : ">=5.4"
},
"require-dev" : {
"phpunit/phpunit" : ">=3.7.28@stable"
},
"autoload" : {
"psr-0" : {
"Mozu" : "src/"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.7.x-dev"
}
}
}

安装错误:

php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package php could not be found in any version, there may be a typo in the package name.
Problem 2
- The requested package php could not be found in any version, there may be a typo in the package name.
Problem 3
- guzzle/guzzle v3.9.2 requires php >=5.3.3 -> no matching package found.
- guzzle/guzzle v3.9.1 requires php >=5.3.3 -> no matching package found.
- guzzle/guzzle v3.9.0 requires php >=5.3.3 -> no matching package found.
- guzzle/guzzle v3.8.1 requires php >=5.3.3 -> no matching package found.
- guzzle/guzzle v3.8.0 requires php >=5.3.3 -> no matching package found.
- guzzle/guzzle v3.7.4 requires php >=5.3.3 -> no matching package found.
- guzzle/guzzle v3.7.3 requires php >=5.3.2 -> no matching package found.
- Installation request for guzzle/guzzle >=3.7.3@stable -> satisfiable by guzzle/guzzle[v3.7.3, v3.7.4, v3.8.0, v3.8.1, v3.9.0, v3.9.1, v3.9.2].

PHP 版本:

php -v
PHP 5.3.10-1ubuntu3.13 with Suhosin-Patch (cli) (built: Jul 7 2014 18:52:09)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

PHP curl 版本:

apt-get install php5-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-curl is already the newest version.

Composer 版本:

 php composer.phar self-update
You are already using composer version 1e27ff5e22df81e3cd0cd36e5fdd4a3c5a031f4a.

最佳答案

好的,将 "php": ">=5.4"的要求更改为 "php": ">=5.3"并且成功了!

不知道为什么它需要 php 的开发版本,但是哦,好吧!

关于PHP Composer "no matching package found"(魔族 PHP API),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25312614/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com