spatie / laravel-medialibrary

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

When installing on laravel7.x it throw symphony error #2015

Closed Neeraj1005 closed 4 years ago

Neeraj1005 commented 4 years ago

I have laravel 7.x project. And before installing this package i did config:clear or dump-autoload but I don't know why this throw an error and I have laravel7.x project no upgrade nothing else. This is the half part error I put because it is too long errors:


2 seconds ago
BEST ANSWER
@sinnbeck same error. I put some half errors

λ composer require "spatie/laravel-medialibrary:^8.5"
./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
    - spatie/image 1.7.6 requires ext-exif * -> the requested PHP extension exif is missing from your system.
    - spatie/image 1.7.5 requires ext-exif * -> the requested PHP extension exif is missing from your system.
    - spatie/image 1.7.4 requires ext-exif * -> the requested PHP extension exif is missing from your system.
    - spatie/image 1.7.3 requires ext-exif * -> the requested PHP extension exif is missing from your system.
    - spatie/image 1.7.2 requires ext-exif * -> the requested PHP extension exif is missing from your system.
    - spatie/image 1.7.1 requires ext-exif * -> the requested PHP extension exif is missing from your system.
    - spatie/image 1.7.0 requires ext-exif * -> the requested PHP extension exif is missing from your system.
    - spatie/image 1.6.0 requires ext-exif * -> the requested PHP extension exif is missing from your system.
    - spatie/image 1.5.3 requires ext-exif * -> the requested PHP extension exif is missing from your system.
    - Conclusion: remove symfony/console v5.1.3
    - Conclusion: don't install symfony/console v5.1.3
    - spatie/image 1.4.0 requires symfony/process ^3.0 -> satisfiable by symfony/process[3.0.x-dev, 3.1.x-dev, 3.2.x-dev, 3.3.x-dev, 3.4.x-dev, v3.0.0, v3.0.0-BETA1, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8, v3.0.9, v3.1.0, v3.1.0-BETA1, v3.1.0-RC1, v3.1.1, v3.1.10, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7, v3.1.8, v3.1.9, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.10, v3.2.11, v3.2.12, v3.2.13, v3.2.14, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6, v3.2.7, v3.2.8, v3.2.9, v3.3.0, v3.3.0-BETA1, v3.3.0-RC1, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.17, v3.3.18, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.28, v3.4.29, v3.4.3, v3.4.30, v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v3.4.37, v3.4.38, v3.4.39, v3.4.4, v3.4.40, v3.4.41, v3.4.42, v3.4.43, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9].
.
.
.
....
 - Can only install one of: symfony/process[4.4.x-dev, v5.1.3].
    - Can only install one of: symfony/process[v4.4.0, v5.1.3].
    - Can only install one of: symfony/process[v4.4.0-BETA1, v5.1.3].
    - Can only install one of: symfony/process[v4.4.0-BETA2, v5.1.3].
    - Can only install one of: symfony/process[v4.4.0-RC1, v5.1.3].
    - Can only install one of: symfony/process[v4.4.1, v5.1.3].
    - Can only install one of: symfony/process[v4.4.10, v5.1.3].
    - Can only install one of: symfony/process[v4.4.11, v5.1.3].
    - Can only install one of: symfony/process[v4.4.2, v5.1.3].
    - Can only install one of: symfony/process[v4.4.3, v5.1.3].
    - Can only install one of: symfony/process[v4.4.4, v5.1.3].
    - Can only install one of: symfony/process[v4.4.5, v5.1.3].
    - Can only install one of: symfony/process[v4.4.6, v5.1.3].
    - Can only install one of: symfony/process[v4.4.7, v5.1.3].
    - Can only install one of: symfony/process[v4.4.8, v5.1.3].
    - Can only install one of: symfony/process[v4.4.9, v5.1.3].
    - Installation request for symfony/process (locked at v5.1.3) -> satisfiable by symfony/process[v5.1.3].

  To enable extensions, verify that they are enabled in your .ini files:
    - C:\laragon\bin\php\php-7.4.8-Win32-vc15-x64\php.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

can anyone tell me how to resolve in my project and what I have to do?

Neeraj1005 commented 4 years ago

I solved this issue. In my case in my php.ini, these extensions were not enabled. so If anyone faces the same problem so, don't forget to enable these extensions then install the package.

extension=mbstring
extension=exif