Laravel 5.3 socialite installation error - php

I am trying to install laravel socialite plugin using this command
composer require laravel/socialite
But i will get the following error
Your requirements could not be resolved to an installable set of
packages
Problem 1
- laravel/socialite v3.0.0 requires illuminate/http ~5.4 -> satisfiable by illuminate/http[v5.4.0].
- laravel/socialite v3.0.2 requires illuminate/http ~5.4 -> satisfiable by illuminate/http[v5.4.0].
- laravel/socialite v3.0.3 requires illuminate/http ~5.4 -> satisfiable by illuminate/http[v5.4.0].
- Conclusion: don't install illuminate/http v5.4.0
- Installation request for laravel/socialite ^3.0 -> satisfiable by laravel/socialite[v3.0.0, v3.0.2, v3.0.3].
Laravel version: 5.3
php version 7.0.13

I think the issue is that you are trying to install latest socialite package for the Laravel 5.3 which needs at least Laravel 5.4.
Problem 1 - laravel/socialite v3.0.0 requires illuminate/http ~5.4 -> satisfiable by
Try to install on Laravel 5.4.
Check this:
https://github.com/laravel/socialite/blob/3.0/composer.json
"require": {
"php": ">=5.4.0",
"illuminate/contracts": "~5.4",
"illuminate/http": "~5.4",
"illuminate/support": "~5.4",
"guzzlehttp/guzzle": "~6.0",
"league/oauth1-client": "~1.0"
},
It requires 5.4
OR
As an alternative you can use the older version of socialite which is compatible with Laravel 5.3 like:
composer require laravel/socialite 2.0

Solution :
For laravel 5.3
Run following command and this will work for you.
composer require laravel/socialite ^2.0

May be this would help
composer require laravel/socialite "^3.2.0"
https://laravel.com/docs/5.6/socialite#installation

composer require laravel/socialite "~3.2.0"

Related

How can I upgrade Carbon with Laravel 5.6?

I tried in cmd "composer require nesbot/carbon" but I got this:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework v5.6.27 requires nesbot/carbon 1.25.* -> satisfiable by nesbot/carbon[1.25.0] but these conflict with your requirements or minimum-stability.
- laravel/framework v5.6.27 requires nesbot/carbon 1.25.* -> satisfiable by nesbot/carbon[1.25.0] but these conflict with your requirements or minimum-stability.
- laravel/framework v5.6.27 requires nesbot/carbon 1.25.* -> satisfiable by nesbot/carbon[1.25.0] but these conflict with your requirements or minimum-stability.
- Installation request for laravel/framework (locked at v5.6.27, required as 5.6.*) -> satisfiable by laravel/framework[v5.6.27].
Installation failed, reverting ./composer.json to its original content.
I don't recommend doing this without extreme caution because there may be a reason why Laravel, or any of your other dependencies, require a very strict version of a package.
With that said, Composer does include a neat trick to alias versions to get around this by specifying an alias version in composer.json:
"require": {
...
"nesbot/carbon": "1.32.0 as 1.25.0"
},
Note the as 1.25.0 which will trick other packages into thinking 1.32.0 is equivalent to 1.25.0 for dependencies. This trick requires exact versions.
Carbon 2 is officially supported by Laravel since the version 5.8, if you want to use it on a lower version, you can follow those steps:
Set explicitly the Carbon version and add the adapter in your composer.json:
{
"require": {
"nesbot/carbon": "2.21.3 as 1.34.0"
}
}

Laravel passport installation error

I've just downloaded the latest laravel 5.3 and I'm trying to install passport, but I'm getting the following composer error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/passport v2.0.0 requires illuminate/http ~5.4 -> satisfiable by illuminate/http[v5.4.0].
- laravel/passport v2.0.1 requires illuminate/http ~5.4 -> satisfiable by illuminate/http[v5.4.0].
- Conclusion: don't install illuminate/http v5.4.0
- Installation request for laravel/passport ^2.0 -> satisfiable by laravel/passport[v2.0.0, v2.0.1].
Installation failed, reverting ./composer.json to its original content.
Composer .json file
http://pastebin.com/ne4RkL96
It happens, because after releasing Laravel 5.4, this package also had been updated to v 2.0 and requires Laravel 5.4. But you are using Laravel 5.3. Try to install earlier version:
composer require laravel/passport ^v1
Also, you can learn about the versions of this package here:
Laravel Passport
For Laravel 5.3.
In your composer.json file put "laravel/passport": "~1.0" and run "composer update" command.
In line with Rashad's answer as it helped me out, you need a version of passport less than major version 2. This can be accomplished with several version strings ^v1, v1.x, >= 1 < 2 and several other combinations.
I used this: php composer.phar require laravel/passport ^v1 and it worked awesomely.
Install laravel passport version 7:
> composer require laravel/passport:7.5.1

install Google's ClientAPI in Laravel 5.x with Composer

I've been trying to install Google's ClientAPI, but it's got tons of dependency issues. I've searched the web, with no luck whatsoever.
I tried to install the faulty dependencies myself, but they had the same issue. Here's the message I'm getting:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- google/apiclient v2.0.0-RC3 requires guzzlehttp/guzzle 5.2.* -> satisfiable by guzzlehttp/guzzle[5.2.0] but these conflict with your requirements or minimum-stability.
- google/apiclient v2.0.0-RC2 requires guzzlehttp/guzzle 5.2.* -> satisfiable by guzzlehttp/guzzle[5.2.0] but these conflict with your requirements or minimum-stability.
- google/apiclient v2.0.0-RC1 requires guzzlehttp/guzzle 5.2.* -> satisfiable by guzzlehttp/guzzle[5.2.0] but these conflict with your requirements or minimum-stability.
- Conclusion: don't install google/apiclient 2.x-dev
- Conclusion: don't install google/apiclient v2.0.3
- Installation request for phpseclib/phpseclib (locked at 0.3.10) -> satisfiable by phpseclib/phpseclib[0.3.10].
- Conclusion: don't install google/apiclient v2.0.2
- Conclusion: don't install google/apiclient v2.0.1
- google/apiclient v2.0.0 requires google/auth 0.8 -> satisfiable by google/auth[v0.8].
- google/apiclient v2.0.0-RC8 requires google/auth 0.8 -> satisfiable by google/auth[v0.8].
- Conclusion: don't install google/auth v0.8
- Installation request for guzzlehttp/psr7 (locked at 1.4.x-dev) -> satisfiable by guzzlehttp/psr7[1.4.x-dev].
- google/apiclient v2.0.0-RC6 requires google/auth 0.7 -> satisfiable by google/auth[v0.7].
- google/apiclient v2.0.0-RC7 requires google/auth 0.7 -> satisfiable by google/auth[v0.7].
- Conclusion: don't install google/auth v0.7
- 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 google/apiclient ^2.0 -> satisfiable by google/apiclient[2.x-dev, v2.0.0, v2.0.0-RC1, v2.0.0-RC2, v2.0.0-RC3, v2.0.0-RC4, v2.0.0-RC5, v2.0.0-RC6, v2.0.0-RC7, v2.0.0-RC8, v2.0.1, v2.0.2, v2.0.3].
Installation failed, reverting ./composer.json to its original content.
At this point all I can think of is to install ClientAPI outside of composer, but I don't know if it's a good idea or not!
And here's my composer.json file (only the relevant parts):
"minimum-stability": "dev",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"tymon/jwt-auth": "0.5.*",
"barryvdh/laravel-cors": "^0.8.0",
"laravel/socialite": "^2.0",
"guzzlehttp/guzzle": "^6.1",
"intervention/image": "^2.3",
"kozz/laravel-guzzle-provider": "^6.0",
"symfony/psr-http-message-bridge": "^0.2.0",
"fairholm/elasticquent": "dev-feature/laravel-5",
"graham-campbell/flysystem": "^3.3",
"league/flysystem-sftp": "^1.0",
"netshell/paypal": "dev-master",
"facebook/php-sdk-v4": "~5.0"
},
The problem is there is conflict between your old package requirements and you new package requirements.
This is worst part of composer or disadvantage of composer.
you have to manually install a package version which is satisfiable with both package. And trust me it is very hard to do.
I found a solution on GitHub google API PHP client issues and discussion. That actually solve my problem as well. referring to the original post so that it might also save someone's day.
https://github.com/googleapis/google-api-php-client/issues/969
The idea is to simply add "google/apiclient": "^2.0" directly to composer.json and running composer update.
Installation request for phpseclib/phpseclib (locked at 0.3.10)
Installation request for guzzlehttp/psr7 (locked at 1.4.x-dev)
It seems that some packages are "locked at" specific versions (as per your composer.lock).
To see why they're locked, run:
composer why org/package -t
You may try to update these dependencies by:
composer update --with-dependencies
However, if that won't help, consider removing composer.lock and re-run composer install.
Try also your configuration on the empty folder.
To see the installed dependency tree, run:
composer show -t
To see the requirements for the given package, run for example:
composer show -a google/apiclient 2.0.3
This can give some idea what is wrong. To see more verbose output, add -v to your command.
For further troubleshooting the issue, see:
How to resolve a "Can only install one of:" conflict?
How to explain Composer's error log?

composer error: Installation failed, reverting ./composer.json to its original content

I try install https://github.com/google/google-api-php-client for my php project via composer.
composer.json:
{
"require": {
"Intervention/image": "~2.3.7",
"intervention/image": "^2.3",
"guzzlehttp/guzzle": "^6.2"
}
}
I run this command:
composer require google/apiclient:^2.0
And result:
./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
- google/apiclient v2.0.0 requires google/auth 0.8 -> satisfiable by google/auth[v0.8].
- Installation request for google/apiclient 2.0 -> satisfiable by google/apiclient[v2.0.0].
- Conclusion: remove guzzlehttp/psr7 1.3.0
- Conclusion: don't install guzzlehttp/psr7 1.3.0
- google/auth v0.8 requires guzzlehttp/psr7 1.2.* -> satisfiable by guzzlehttp/psr7[1.2.0, 1.2.1, 1.2.2, 1.2.3].
- Can only install one of: guzzlehttp/psr7[1.2.0, 1.3.0].
- Can only install one of: guzzlehttp/psr7[1.2.1, 1.3.0].
- Can only install one of: guzzlehttp/psr7[1.2.2, 1.3.0].
- Can only install one of: guzzlehttp/psr7[1.2.3, 1.3.0].
- Installation request for guzzlehttp/psr7 (locked at 1.3.0) -> satisfiable by guzzlehttp/psr7[1.3.0].
Installation failed, reverting ./composer.json to its original content.
Also I installed php composer.phar require guzzlehttp/guzzle before...
I would try removing your project's requirement of guzzlehttp/guzzle and let your Google dependency tell composer what version it wants to pull in. Google's package (for some reason) has a version floor of 1.2 for guzzlehttp/psr7, and composer is complaining that it can't figure out how to satisfy this requirement.
Since your new dependency (the Google package) also requires guzzlehttp/guzzle, you don't need to specifically require it, so I would just remove it and try composer update again.

Dependency issue upgrading laravel 4 package to laravel 5

I am attempting to update a composer package for Laravel 5. The Laravel 4 composer.json schema includes this:
"require": {
"php": ">=5.3.3",
"illuminate/foundation": "4.*",
"illuminate/support": "4.*"
},
I am attempting to update it to something like this:
"require": {
"php": ">=5.3.3",
"illuminate/foundation": "4.*",
"illuminate/support": "5.*"
},
After running composer install, I got an error saying that illuminate/foundation could not be found, so I tried changing the minimum-stability to dev. Composer can find the package now, but I get this error:
Problem 1
- illuminate/exception dev-master requires illuminate/support 5.0.* -> satisfiable by illuminate/support[5.0.x-dev, v5.0.0, v5.0.4].
- Can only install one of: illuminate/support[dev-master, 5.0.x-dev].
- Can only install one of: illuminate/support[v5.0.0, dev-master].
- Can only install one of: illuminate/support[v5.0.4, dev-master].
- illuminate/foundation 4.0.x-dev requires illuminate/exception dev-master -> satisfiable by illuminate/exception[dev-master].
- illuminate/foundation 4.0.x-dev requires illuminate/support dev-master -> satisfiable by illuminate/support[dev-master].
- Installation request for illuminate/foundation 4.* -> satisfiable by illuminate/foundation[4.0.x-dev].
I need illuminate/support to be 5+ because of the changes in Laravel 5's service providers regarding config publishing. I need illuminate/foundation because the unit tests require it.
How can I structure these dependencies so composer can install them?
I have tried also setting illuminate/support to dev-master, and both illuminate packages to dev-master, both resolving to different errors. Is the only way to fix this to update upstream dependencies?
I have already gotten the updates to install and (seemingly) work correctly in a Laravel 5 installation. I may have worked around my issue by just making the entire laravel/framework a dependency, but I really don't think I want to leave that as the solution.
Additional outputs from running composer install
illuminate/support # dev-master and illuminate/foundation at 4.* :
Problem 1
- Installation request for illuminate/foundation 4.* -> satisfiable by illuminate/foundation[4.0.x-dev].
- illuminate/exception dev-master requires illuminate/support 5.0.* -> satisfiable by illuminate/support[5.0.x-dev].
- Can only install one of: illuminate/support[dev-master, 5.0.x-dev].
- illuminate/foundation 4.0.x-dev requires illuminate/exception dev-master -> satisfiable by illuminate/exception[dev-master].
- Installation request for illuminate/support dev-master -> satisfiable by illuminate/support[dev-master].
illuminate/support # dev-master and illuminate/foundation at dev-master :
Problem 1
- Installation request for illuminate/foundation dev-master -> satisfiable by illuminate/foundation[dev-master].
- illuminate/exception dev-master requires illuminate/support 5.0.* -> satisfiable by illuminate/support[5.0.x-dev].
- Can only install one of: illuminate/support[dev-master, 5.0.x-dev].
- illuminate/foundation dev-master requires illuminate/exception dev-master -> satisfiable by illuminate/exception[dev-master].
- Installation request for illuminate/support dev-master -> satisfiable by illuminate/support[dev-master].
Never ever use dev-master as version, just use 5.* (for both packages) and you're ready.

Categories