Reputation: 210
I'm trying to install Google client library with composer using:
composer require google/apiclient:^2.0.0@RC
and I get this
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install google/apiclient 2.x-dev
- Conclusion: don't install google/apiclient v2.0.0-RC6
- google/apiclient v2.0.0-RC4 requires google/auth 0.5 -> satisfiable by google/auth[v0.5].
- google/apiclient v2.0.0-RC5 requires google/auth 0.5 -> satisfiable by google/auth[v0.5].
- Conclusion: don't install google/auth v0.5
- Installation request for guzzlehttp/guzzle == 4.2.3.0 -> satisfiable by guzzlehttp/guzzle[4.2.3].
- google/apiclient v2.0.0-RC1 requires guzzlehttp/guzzle 5.2.* -> satisfiable by guzzlehttp/guzzle[5.2.0].
- google/apiclient v2.0.0-RC2 requires guzzlehttp/guzzle 5.2.* -> satisfiable by guzzlehttp/guzzle[5.2.0].
- google/apiclient v2.0.0-RC3 requires guzzlehttp/guzzle 5.2.* -> satisfiable by guzzlehttp/guzzle[5.2.0].
- Conclusion: don't install guzzlehttp/guzzle 5.2.0
- Installation request for google/apiclient ~2.0@dev -> satisfiable by google/apiclient[2.x-dev, v2.0.0-RC1, v2.0.0-RC2, v2.0.0-RC3, v2.0.0-RC4, v2.0.0-RC5, v2.0.0-RC6].
Upvotes: 0
Views: 7326
Reputation: 11
I once had this same problem while developing an application that needed Google Library. There is a package you have installed that required another version of the Google Library dependency package, in my case it was firebase/php-jwt (v4.0.0)
whereas the Google Library required v3.0.0.
Upvotes: 0
Reputation: 36514
I just had a similar issue with another Google package when running composer update
:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- googleads/googleads-php-lib dev-experimental requires google/auth 0.7 -> satisfiable by google/auth[v0.7].
- googleads/googleads-php-lib dev-experimental requires google/auth 0.7 -> satisfiable by google/auth[v0.7].
- Conclusion: don't install google/auth v0.7
- Installation request for googleads/googleads-php-lib dev-experimental -> satisfiable by googleads/googleads-php-lib[dev-experimental].
I had no conflicting packages. The solution was to:
googleads/googleads-php-lib
line from composer.jsoncomposer update
composer update
againThis worked for me.
Upvotes: 1
Reputation: 41756
Give this a try:
composer require google/apiclient:2.0.0-RC6
2.0.0-RC6
composer require google/apiclient:2.0.*@dev
2.0.*
range with dev
stabilityExample run for composer require google/apiclient:2.0.*@dev
:
./composer.json has been created
Warning: You should avoid overwriting already defined auth settings for github.com.
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing psr/http-message (1.0)
Loading from cache
- Installing guzzlehttp/psr7 (1.2.3)
Loading from cache
- Installing guzzlehttp/promises (1.1.0)
Loading from cache
- Installing guzzlehttp/guzzle (6.1.1)
Loading from cache
- Installing phpseclib/phpseclib (2.0.1)
Loading from cache
- Installing psr/log (1.0.0)
Loading from cache
- Installing monolog/monolog (1.18.0)
Loading from cache
- Installing firebase/php-jwt (v3.0.0)
Loading from cache
- Installing google/auth (v0.7)
Loading from cache
- Installing google/apiclient (v2.0.0-RC6)
Loading from cache
phpseclib/phpseclib suggests installing ext-libsodium (SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.)
phpseclib/phpseclib suggests installing ext-gmp (Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing raven/raven (Allow sending log messages to a Sentry server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing videlalvaro/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
Writing lock file
Generating autoload files
Upvotes: 1