Your requirements could not be resolved to an installable set of packages for pinterest API

荒凉一梦 提交于 2019-12-24 08:37:19

问题


This is the Github Page for API. This is the command I run in composer:

composer require dirkgroenen/Pinterest-API-PHP 0.2.11

and this is the error I get

Your requirements could not be resolved to an installable set of packages.

Problem 1 - The requested package dirkgroenen/pinterest-api-php No version set (parsed as 1.0.0) is satisfiable by dirkgroenen/pinterest-api-php[No version set (parsed as 1.0.0)] but these conflict with your requirements or minimum-stability.

Here is the link to packagist page of the API.

The composer.json file has the following data:

"require": {
    "php": ">=5.4",
    "ext-curl": "*"
},
"require-dev": {
    "phpunit/phpunit": "4.7.*",
    "vlucas/phpdotenv": "^2.2"
},

The requirements in the composr.json file match those specified on the packagist page so how can I resolve this error?


回答1:


The proper format should be:

composer require "dirkgroenen/Pinterest-API-PHP:0.2.11"

Or alternatively, you can add it to your composer.json:

"dirkgroenen/Pinterest-API-PHP" : "0.2.11",

Then do a composer install



来源:https://stackoverflow.com/questions/39010228/your-requirements-could-not-be-resolved-to-an-installable-set-of-packages-for-pi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!