FriendsOfFlarum / upload

The file upload extension with insane intelligence for your Flarum forum.
https://discuss.flarum.org/d/4154
MIT License
176 stars 95 forks source link

Failed to install #263

Closed shaohq closed 3 years ago

shaohq commented 3 years ago

I installed flarum with docker image crazymax/flarum:0.1.0-beta.15. But I failed to install fof/upload with the following msg

/opt/flarum # extension require fof/upload
Using version ^0.12.9 for fof/upload
./composer.json has been updated
Running composer update fof/upload
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires fof/upload ^0.12.9 -> satisfiable by fof/upload[0.12.9].
    - fof/upload 0.12.9 requires ramsey/uuid ^3.5.2 -> found ramsey/uuid[3.5.2, ..., 3.9.3] but it conflicts with your root composer.json require (^4.1).

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.
luceos commented 3 years ago

Have you tried adding -W as the error proposes?

shaohq commented 3 years ago

Have you tried adding -W as the error proposes?

Yes, here is the result:

/opt/flarum # extension require fof/upload -W
Using version ^0.12.9 for fof/upload
./composer.json has been updated
Running composer update fof/upload
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires fof/upload ^0.12.9 -> satisfiable by fof/upload[0.12.9].
    - fof/upload 0.12.9 requires ramsey/uuid ^3.5.2 -> found ramsey/uuid[3.5.2, ..., 3.9.3] but it conflicts with your root composer.json require (^4.1).

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.
/opt/flarum # 
luceos commented 3 years ago

Why is ramsey/uuid in your composer.json? Remove that line, run composer update and then run the command again.

shaohq commented 3 years ago

It works after I removed all the data under /data. I think it's because I installed some extension which requires ramsey/uuid:4.1