【发布时间】:2014-01-23 20:21:25
【问题描述】:
我一直在尝试使用 composer 在我的本地主机中安装 mailgun 库。我在命令提示符下写了以下命令:
php composer require mailgun/mailgun-php:~1.3
它给了我Could not open input file: composer的错误
然后我尝试删除上一个命令开头的php:
composer require mailgun/mailgun-php:~1.3
它显示:
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package mailgun/mailgun-php 1.0.0 could not be found.
Problem 2
- guzzle/guzzle v3.7.4 requires ext-curl * -> the requested PHP extension cu
rl is missing from your system.
- guzzle/guzzle v3.7.3 requires ext-curl * -> the requested PHP extension cu
rl is missing from your system.
- guzzle/guzzle v3.7.2 requires ext-curl * -> the requested PHP extension cu
rl is missing from your system.
- guzzle/guzzle v3.7.1 requires ext-curl * -> the requested PHP extension cu
rl is missing from your system.
- guzzle/guzzle v3.7.0 requires ext-curl * -> the requested PHP extension cu
rl is missing from your system.
- Installation request for guzzle/guzzle 3.7.* -> satisfiable by guzzle/guzz
le[v3.7.0, v3.7.1, v3.7.2, v3.7.3, v3.7.4].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your min
imum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> f
or more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common
problems.
Installation failed, reverting ./composer.json to its original content.
我这几天一直在努力安装mailgun,请帮助我。
更新:
仅供参考:我正在使用 xampp 使用 Windows
composer.phar 文件详情:
{
"name": "mailgun/mailgun-php",
"description": "The Mailgun SDK provides methods for all API functions.",
"require": {
"guzzle/guzzle": "3.7.*"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
},
"autoload": {
"psr-0": {
"Mailgun\\Tests": "tests/",
"Mailgun": "src/"
}
},
"license": "MIT",
"authors": [
{
"name": "Travis Swientek",
"email": "travis@mailgunhq.com"
}
],
"minimum-stability": "stable"
}
【问题讨论】:
-
请给我看看你当前的 composer.json
-
我已经用 composer.phar 文件更新了我的问题。 (我最近回复了你的答案,因为不幸的是我第一次没有收到关于 stackoverflow 活动的任何通知)
-
请给我看你项目的 composer.json ,而不是 mailgun 库的 composer.json 文件
-
实际上,我还没有为自己创建任何项目。我已经下载了 mailgun 库并一直在尝试测试他们的 API。
-
好的,您的作曲家没有按预期工作。 1.检查作曲家的版本(
composer -V)。 2. 检查你的项目根目录是否有composer.lock。 3. 检查是否可以在新文件夹中运行composercomposer require mailgun/mailgun-php=1.5。
标签: windows composer-php mailgun