2

I'm trying to install Lumen through the command composer global require "laravel/lumen-installer" but throws the following error on terminal.

Changed current directory to /home/lykos/.config/composer
Using version ^1.0 for laravel/lumen-installer
./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
    - Conclusion: don't install laravel/lumen-installer v1.0.2
    - Conclusion: don't install laravel/lumen-installer v1.0.1
    - Installation request for symfony/console (locked at v4.0.3) -> satisfiable by symfony/console[v4.0.3].
    - Conclusion: remove guzzlehttp/guzzle 6.3.0
    - Installation request for laravel/lumen-installer ^1.0 -> satisfiable by laravel/lumen-installer[v1.0.0, v1.0.1, v1.0.2].
    - Conclusion: don't install guzzlehttp/guzzle 6.3.0
    - laravel/lumen-installer v1.0.0 requires guzzlehttp/guzzle ~4.0|~5.0 -> satisfiable by guzzlehttp/guzzle[4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5, 4.1.6, 4.1.7, 4.1.8, 4.2.0, 4.2.1, 4.2.2, 4.2.3, 4.2.4, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.1.0, 5.2.0, 5.3.0, 5.3.1, 5.3.2].
    - Can only install one of: guzzlehttp/guzzle[4.0.0, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.0.1, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.0.2, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.1.0, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.1.1, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.1.2, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.1.3, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.1.4, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.1.5, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.1.6, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.1.7, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.1.8, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.2.0, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.2.1, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.2.2, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.2.3, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[4.2.4, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[5.0.0, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[5.0.1, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[5.0.2, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[5.0.3, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[5.1.0, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[5.2.0, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[5.3.0, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[5.3.1, 6.3.0].
    - Can only install one of: guzzlehttp/guzzle[5.3.2, 6.3.0].
    - Installation request for guzzlehttp/guzzle (locked at 6.3.0) -> satisfiable by guzzlehttp/guzzle[6.3.0].


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

From a google search I tried to do this rm -R ~/.composer/vendor/guzzlehttp

but throws an error as there's no such a directory

rm: cannot remove '/home/lykos/.composer/vendor/guzzlehttp': No such file or directory

My ~/.config/composer/composer.json file looks like this

{
    "require": {
        "laravel/installer": "^1.5"
    }
}

Any ideas how to fix this issue?

kenorb
  • 155,785
  • 88
  • 678
  • 743
ltdev
  • 4,037
  • 20
  • 69
  • 129

5 Answers5

4

Taylor fixed this in v1.0.3, but it hasn't been tagged, so you can install dev-master to get the updated version: composer global require laravel/lumen-installer:dev-master

Ian
  • 266
  • 2
  • 3
1

Try to remove global ~/.composer directory. Install lumen/installer first, then laravel/installer global. Works for me fine.

kenorb
  • 155,785
  • 88
  • 678
  • 743
Sascha
  • 31
  • 3
1

laravel/lumen-installer v1.0.0 requires guzzlehttp/guzzle ~4.0|~5.0

Installation request for guzzlehttp/guzzle (locked at 6.3.0)

This means guzzlehttp/guzzle is locked at 6.3.0" as per your composer.lock file, and your package (laravel/lumen-installer) requires guzzlehttp/guzzle ~4.0|~5.0. Check it by grep 6.3.0 ~/.composer/composer.lock command.

Therefore you need to remove guzzlehttp/guzzle from your ~/.composer/composer.json as per the suggestion:

Conclusion: remove guzzlehttp/guzzle 6.3.0

Otherwise, if it's not there, you need to remove the package which depends on it, or upgrade laravel/lumen-installer to v1.0.3 (as already suggested). E.g.

composer global require laravel/lumen-installer:^1.0.3

To see the dependency tree (what is using different version of guzzle), you can run:

composer global show -t

See also: How to resolve a "Can only install one of:" conflict?

Community
  • 1
  • 1
kenorb
  • 155,785
  • 88
  • 678
  • 743
0

You should clear the cache with composer clearcache then run

composer global require "laravel/lumen-installer"

It is mostly caused when composer cached some of the packages and try to install required packages from cache.

try installing with composer create-project --prefer-dist laravel/lumen project

Hope this helps.

FULL STACK DEV
  • 15,207
  • 5
  • 46
  • 66
0

I got this same problem today, it was caused by some other globally required packages, please check ~/.composer/composer.json. In my case, laravel/install 2.0.1 wants guzzle 6.0.0 while an old lumen/install wants guzzle 5.3.2, but Composer can allow only one version installed. Problem solved by removing the lumen line and run composer update in that directory.

kenorb
  • 155,785
  • 88
  • 678
  • 743
Jing
  • 78
  • 4