简体   繁体   中英

when I use composer update or update new extensions, get error says verify that they are enabled in your .ini files

The error message is like this:

To enable extensions, verify that they are enabled in your .ini files: -- - -/usr/local/etc/php/7.2/php.ini - /usr/local/etc/php/7.2/conf.d/ext-opcache.ini - /usr/local/etc/php/7.2/conf.d/xdebug.ini

error screenshot

I don't know how to enable this file. But when I go into that path, it exists. Can everyone help me solve that? Thanks a lot!

You need to install imagick to resolve this issue:

As per the Laravel Medialibrary requirements

The Medialibrary package requires PHP 5.5.9+ and Laravel 5.1.0+. To create derived images GD needs to be installed on your server. If you want to create PDF thumbnails Imagick is also required.

GD and Imagick can be installed using apt-get on Ubuntu and Debian :

$ apt-get install php-gd imagemagick php-imagick

Or with yum on CentOS :

$ yum install php70u-gd ImageMagick ImageMagick-devel

Note: Root access to your server is probably required.

OR

To resolve this add below lines in your composer.json:

{
    "require": {
       "spatie/laravel-medialibrary": "^7.0.0" // add this line
    },
   "provide": { // add this
       "ext-imagick": "*" //add this
   },  // add this
    "require-dev": {

    }
}

and run your command again

References:

https://docs.spatie.be/laravel-medialibrary/v3/requirements/#

https://github.com/spatie/laravel-medialibrary/issues/1480

https://github.com/spatie/laravel-medialibrary/issues/1553

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM