繁体   English   中英

当我使用 Composer 更新或更新新扩展时,出现错误提示验证它们是否已在您的 .ini 文件中启用

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

错误信息是这样的:

要启用扩展,请验证它们是否在您的 .ini 文件中启用: -- - -/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

错误截图

我不知道如何启用此文件。 但是当我走上那条路时,它就存在了。 大家能帮我解决吗? 非常感谢!

您需要安装imagick来解决此问题:

根据Laravel Medialibrary要求

Medialibrary 包需要 PHP 5.5.9+ 和 Laravel 5.1.0+。 要创建派生图像,需要在您的服务器上安装 GD。 如果要创建 PDF 缩略图,还需要 Imagick。

GDImagick可以在Ubuntu and Debian上使用 apt-get 安装:

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

或者yum on CentOS使用yum on CentOS

$ yum install php70u-gd ImageMagick ImageMagick-devel

注意:可能需要对服务器的 Root 访问权限。

或者

要解决此问题,请在composer.json:添加以下几行composer.json:

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

    }
}

并再次运行您的命令

参考:

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

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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