spatie / laravel-medialibrary

Associate files with Eloquent models
https://spatie.be/docs/laravel-medialibrary
MIT License
5.76k stars 1.07k forks source link

I couldn't install this package with Laravel 5.7.* #1253

Closed eichgi closed 5 years ago

eichgi commented 6 years ago

Composer throws this message:

Problem 1
    - Installation request for spatie/laravel-medialibrary 7.0.0 -> satisfiable by spatie/laravel-medialibrary[7.0.0].
    - Conclusion: remove laravel/framework v5.7.6
    - Conclusion: don't install laravel/framework v5.7.6
    - spatie/laravel-medialibrary 7.0.0 requires illuminate/pipeline ~5.5.0|~5.6.0 -> satisfiable by illuminate/pipeline[5.5.x-dev, 5.6.x-dev, v
5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.6.0, v5.6.1, v5.6.
10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.2
6, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.4, v5.6.5, v5.6.6, v
5.6.7, v5.6.8, v5.6.9].
    - don't install illuminate/pipeline 5.5.x-dev|don't install laravel/framework v5.7.6
.......
- Installation request for laravel/framework (locked at v5.7.6, required as 5.7.*) -> satisfiable by laravel/framework[v5.7.6].

How can I achieve the installation?

dundermave commented 6 years ago

yup, not able to install on 5.7.*

bscript commented 6 years ago

Working fine on : Laravel Framework 5.7.6 fine

Could you please post your composer.json content here !

eichgi commented 6 years ago

Sure, this is my composer file:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": "^7.1.3",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "5.7.*",
        "laravel/tinker": "^1.0",
        "yajra/laravel-datatables-oracle": "~8.0"
    },
    "require-dev": {
        "beyondcode/laravel-dump-server": "^1.0",
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^2.0",
        "phpunit/phpunit": "^7.0"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "extra": {
        "laravel": {
            "dont-discover": [
            ]
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ],
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}
dundermave commented 6 years ago

I solved it by installing this way: composer require spatie/laravel-medialibrary

It installed me ^7.5 version and now everything works fine

eichgi commented 6 years ago

@dundermave as you mentioned, it works.

I guess the doc shoulnd't specify the version, just the name of the package as you did.

Thanks!

kanokHossain commented 6 years ago

I am also here stack with the same problem.

leonardolouie commented 6 years ago

same problem heree help T_T

leonardolouie commented 6 years ago

Gloudemans/shoppingcart not installing

eichgi commented 6 years ago

@MdkanokHossain & @leonardolouie did you already tried to use the command @dundermave posted before??

leonardolouie commented 5 years ago

@eichgi i use other package and its work now https://github.com/darryldecode/laravelshoppingcart

irfan-mirza686 commented 5 years ago

@eichgi .. i also try this "darryldecode" its work but "Gloudemans" not working .

freekmurze commented 5 years ago

This problem is not caused by this package.

Use prohibits to find out which package is the culprit of the problems: https://getcomposer.org/doc/03-cli.md#prohibits-why-not-

nickforbizz commented 5 years ago

Your requirements could not be resolved to an installable set of packages.

Problem 1

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

trevinl8 commented 5 years ago

As @dundermave has mentioned above, use the below code to install the latest package of the Laravel Media Library.

composer require spatie/laravel-medialibrary

Capture

ahmedsammygeek commented 5 years ago

still can't install it after install on laravel 5.7.28 composer require spatie/laravel-medialibrary

tripletens commented 5 years ago

i have similar issue with installing socialite composer require laravel/socialite i need help please

CoryGrandstaff commented 5 years ago

Did you find a solution Tripletens?

tripletens commented 5 years ago

Not yet

tripletens commented 5 years ago

composer require spatie/laravel-medialibrary

Let me try this one

Towhid86 commented 5 years ago

how can i solve this problem forlaravel-medialibrary ......

problem

Bunix commented 5 years ago

ok found a hacky solution provided by @jstoone: add this to your composer.json:

{ "require": {

jstoone commented 5 years ago

@Towhid86 and others having similar problems, please make sure you have the imagick install and enabled.

Use the following to get information about the imagick extension:

php --re imagick

If the above command fails with a message similar to: Exception: Extension imagick does not exist, then it means you don't have the imagick extension installed/enabled.

Now you have two options:

  1. Install and enable the imagick extension in your dev environment. There are plenty of resources on how to install and enable the extension for any OS you desire.
  2. To a new provides-key in your composer.json-file add ext-imagick to the list. Have a look at https://github.com/spatie/laravel-medialibrary/issues/1553#issuecomment-528343947 for an example of the changes
Adamkaram commented 4 years ago

try this version from maennchen/zipstream-php "maennchen/zipstream-php": " ^1.2", work for me after every thing i tried

istiake5 commented 4 years ago

if you're trying to install it on Laravel 5.7, you should use an older version: composer require beyondcode/laravel-websockets:1.3

The latest (1.4) version only supports Laravel 5.8, 6.x and 7.x.