12

I got de error when I tried install composer league/flysystem-aws-s3-v3
My line: composer require league/flysystem-aws-s3-v3
I using Laravel 8 and php 7.3
I also tested removing composer.lock

Someone already fixed it?


    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - league/flysystem-aws-s3-v3[2.0.0, ..., 2.x-dev] require league/flysystem ^2.0.0 -> found league/flysystem[2.0.0-alpha.1, ..., 2.x-dev] but the package is fixed to 1.1.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
        - league/flysystem-aws-s3-v3[2.0.0-alpha.1, ..., 2.0.0-alpha.2] require league/flysystem 2.0.0-alpha.1 -> found league/flysystem[2.0.0-alpha.1] but the package is fixed to 1.1.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
        - league/flysystem-aws-s3-v3[2.0.0-alpha.4, ..., 2.0.0-beta.1] require league/flysystem 2.0.0-alpha.3 -> found league/flysystem[2.0.0-alpha.3] but the package is fixed to 1.1.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
        - league/flysystem-aws-s3-v3[2.0.0-beta.2, ..., 2.0.0-beta.3] require league/flysystem ^2.0.0-beta.1 -> found league/flysystem[2.0.0-beta.1, ..., 2.x-dev] but the package is fixed to 1.1.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
        - league/flysystem-aws-s3-v3 2.0.0-RC1 requires league/flysystem ^2.0.0-RC1 -> found league/flysystem[2.0.0-RC1, 2.0.0, 2.x-dev] but the package is fixed to 1.1.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
        - Root composer.json requires league/flysystem-aws-s3-v3 ^2.0 -> satisfiable by league/flysystem-aws-s3-v3[2.0.0-alpha.1, ..., 2.x-dev].
    
    Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
    
    Installation failed, reverting ./composer.json and ./composer.lock to their original content.

My composer.json

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.3",
        "aws/aws-sdk-php": "^3.166",
        "fideloper/proxy": "^4.2",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "laravel/framework": "^8.17",
        "laravel/tinker": "^2.0",
        "tymon/jwt-auth": "^1.0"
    },
   ...
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Petronio Amaral
  • 171
  • 1
  • 1
  • 7

6 Answers6

15

I have faced the same problem. I tried this and it's helpful

composer require league/flysystem-aws-s3-v3 ~1.0
Nikunj Sakariya
  • 327
  • 4
  • 9
7

You could try

composer require league/flysystem-aws-s3-v3 ^1.0
Steve
  • 548
  • 1
  • 10
  • 21
5

I search a solution, put this line in my composer.json using tilde before 1.0

"league/flysystem-aws-s3-v3": "~1.0",

It working!!

Petronio Amaral
  • 171
  • 1
  • 1
  • 7
1

There are 2 ways with php 7.x and laravel 8 :

In mac :

composer require league/flysystem-aws-s3-v3 ~1.0

In windows :

composer require league/flysystem-aws-s3-v3 ~1.0 --ignore-platform-reqs

EDIT: when we use ~1.0, it means that we need this approximate version. And in windows, using the --ignore-platform-reqs skip the problems if you don't have all requirements, plugins etc, it's not the most efficient way but it can help temporary until production deployment. If you don't use --ignore-platform-reqs in windows, maybe it can works, depending your environment.

According to this post:

  • using ~version: "Approximately equivalent to version", will update you to all future patch versions, without incrementing the minor version. ~1.2.3 will use releases from 1.2.3 to <1.3.0.
  • using ^version: "Compatible with version", will update you to all future minor/patch versions, without incrementing the major version. ^2.3.4 will use releases from 2.3.4 to <3.0.0.
Jérôme
  • 978
  • 1
  • 9
  • 22
1

The laravel documentation suggests this command for Laravel 8

composer require --with-all-dependencies league/flysystem-aws-s3-v3 "^1.0"

and it worked for me. Earlier, I was trying to install using the command from an older version of laravel docs.

My PHP version is 7.4

Ref: https://laravel.com/docs/8.x/filesystem#composer-packages

Ajith Gopi
  • 1,509
  • 1
  • 12
  • 20
0

Follow these steps and you will be able to install both packages

  • uninstall the current guzzle version

composer remove guzzlehttp/guzzle

  • install the flysystem ver. - 1.0.0

composer require league/flysystem-aws-s3-v3:^1.0

Good luck :-)

in this order it seems that laravel 8 is able to download and install both s

Eugenius
  • 19
  • 1