1

I am having an issue with installing Laravel with composer in Powershell.

When I run composer global require laravel/laravel I get the following output:

Changed current directory to C:/Users/gvqz/AppData/Roaming/Composer
Using version ^6.12 for laravel/laravel
./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
    - Installation request for laravel/laravel ^6.12 -> satisfiable by laravel/laravel[v6.12.0].
    - Conclusion: remove illuminate/container v5.8.36
    - Conclusion: don't install illuminate/container v5.8.36
    - laravel/laravel v6.12.0 requires laravel/framework ^6.2 -> satisfiable by laravel/framework[v6.10.0, v6.10.1, v6.11.0, v6.12.0, v6.13.0, v6.13.1, v6.2.0, v6.3.0, v6.4.0, v6.4.1, v6.5.0, v6.5.1, v6.5.2, v6.6.0, v6.6.1, v6.6.2, v6.7.0, v6.8.0, v6.9.0].
    - don't install laravel/framework v6.10.0|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.10.1|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.11.0|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.12.0|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.13.0|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.13.1|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.2.0|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.3.0|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.4.0|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.4.1|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.5.0|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.5.1|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.5.2|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.6.0|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.6.1|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.6.2|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.7.0|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.8.0|don't install illuminate/container v5.8.36
    - don't install laravel/framework v6.9.0|don't install illuminate/container v5.8.36
    - Installation request for illuminate/container (locked at v5.8.36) -> satisfiable by illuminate/container[v5.8.36].


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

I tried doing composer global remove illuminate/container and got the following:

Changed current directory to C:/Users/gvqz/AppData/Roaming/Composer
illuminate/container is not required in your composer.json and has not been removed
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

I do have valet installed, I am not sure if that is possibly causing an issue?

Any help would be greatly appreciated. Thanks!

  • 1
    may be run `composer global remove laravel/laravel` and `composer global update` first. looks like you have got `illuminate/container - 5.8` which is stopping you – alithedeveloper Jan 29 '20 at 18:50

3 Answers3

0

Go into your composer.json and remove the line illuminate/container. Afterwards you enter your terminal and install the correct version of the package like this:

composer require illuminate/container

Now you have the correct container version and can install or update laravel properly.

utdev
  • 3,942
  • 8
  • 40
  • 70
0

You have not php curl extension.

[Install curl for windows]

How do I install cURL on Windows?

zigvag
  • 1
  • 1
  • 3
0

The fact is that the composer.lock file contains the specific versions of the packages that needs to be installed upon composer install.

You can try to: - delete the vendor folder and run composer install

or: - delete the composer.lock file and run composer update

NOTE: this last method will let composer update your packages to the latest minor version available at the time the command is run (not always recommended especially if you are working in a team with multiple developers).

This will generate a new composer.lock file with the current packages versions that has just been installed. If your then share the whole project (including the composer.lock file) in any way, the composer.lock file will be used to install the particular versions specified in there.

mdexp
  • 3,492
  • 2
  • 9
  • 20