3

I can't install 'laravel 5.5' on fresh 'Pop!_OS' (based on Ubuntu 17.10 by system76) linux instalation.

Can't find how to 'remove symfony/console v4.0.1'. So can anyone help me solve this annoyance?

I followed https://www.youtube.com/watch?v=b38mUODC1l4 this tutorial and everything went perfect till composer global require "laravel/installer" command.

After entering this command the result in terminal is:

    Changed current directory to /home/chakra/.config/composer
Using version ^1.4 for laravel/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/installer v1.4.1
    - Conclusion: remove symfony/console v4.0.1
    - Installation request for laravel/installer ^1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1].
    - Conclusion: don't install symfony/console v4.0.1
    - laravel/installer v1.4.0 requires symfony/console ~2.3|~3.0 -> satisfiable by symfony/console[v2.3.0, ..., v3.4.1].
    - Can only install one of: symfony/console[v3.0.0, v4.0.1].
    ...
    - Can only install one of: symfony/console[v2.8.9, v4.0.1].
    - Installation request for symfony/console (locked at v4.0.1) -> satisfiable by symfony/console[v4.0.1].


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

composer.json /home/chakra/.config/composer (everything is default haven't changed anything like in video tutorial)

After sudo nano composer.json:

{
    "require": {
        "cpriego/valet-linux": "^2.0"
        }
}

Composer, npm, nginx version:

➜  ~ which composer
/usr/local/bin/composer
➜  ~ composer --version
Composer version 1.5.5 2017-12-01 14:42:57
➜  ~ npm --version
5.5.1
➜  ~ nginx -v
nginx version: nginx/1.12.1 (Ubuntu)
➜  ~ 
kenorb
  • 155,785
  • 88
  • 678
  • 743

2 Answers2

4

So with the help of Nico Haase I've figured it out.

And the solution for the problem is:

composer global remove cpriego/valet-linux (this will also remove troublesome symfony/console v4.0.1) after removing this install laravel:

composer global require "laravel/installer" (it installed all required packages without any errors) after this reinstall 'Valet Linux'

composer global require cpriego/valet-linux

Now everything works as it should. I can create laravel application by laravel new application and also valet works as it should. :)

2

Have a look at https://stackoverflow.com/a/27754096 to see a list of installed packages - is symfony/console listed with version 4.0.1 there? The Lavarel installer explicitly asks for v2.3 or v3.x of symfony/console so you probably have to remove symfony/console manually first through composer global remove symfony/console

Nico Haase
  • 11,420
  • 35
  • 43
  • 69
  • Thanks for responding. http://www.paste.org/88968 that's what I get in terminal. I don't know why but it didn't remove `symfony/console` package :| – Romanas Chakra Dec 06 '17 at 17:33
  • Okay, please execute `composer global why symfony/console` to see which other package is responsible for adding `symfony/console` – Nico Haase Dec 06 '17 at 17:41
  • the result is: `mnapoli/silly 1.7.0 requires symfony/console (~3.0|~4.0)` after `composer global why mnapoli/silly` the result is: `cpriego/valet-linux v2.0.22 requires mnapoli/silly (~1.1)` – Romanas Chakra Dec 06 '17 at 17:52