繁体   English   中英

无法在Laravel上将安装php-gd安装到centos 7.2中以用于Intervention Image插件

[英]cannot install install php-gd into centos 7.2 for Intervention Image plugin on laravel

晕家伙。 我真的很想在我的laravel上安装Intervention Image。 我正在使用 :

  • Laravel Framework 5.4.36,
  • PHP 7.2.12
  • 便当/centos7.2
  • 流浪汉2.1.1

起初,我在设置“干预图像”后收到此错误。

GD Library extension not available with this PHP installation.

所以我推荐这个:

sudo yum -y install php-gd

但显示错误:

Error: Package: php-gd-5.4.16-46.el7.x86_64 (base)
           Requires: php-common(x86-64) = 5.4.16-46.el7
           Installed: php-common-7.2.12-1.el7.remi.x86_64 (@remi-php72)
               php-common(x86-64) = 7.2.12-1.el7.remi
           Available: php-common-5.4.16-46.el7.x86_64 (base)
               php-common(x86-64) = 5.4.16-46.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我也用以下代码运行:

sudo yum -y install php-gd --skip-broken

但显示此错误:

Packages skipped because of dependency problems:
    libX11-1.6.5-2.el7.x86_64 from base
    libX11-common-1.6.5-2.el7.noarch from base
    libXau-1.0.8-2.1.el7.x86_64 from base
    libXpm-3.5.12-1.el7.x86_64 from base
    libjpeg-turbo-1.2.90-6.el7.x86_64 from base
    2:libpng-1.5.13-7.el7_2.x86_64 from base
    libxcb-1.13-1.el7.x86_64 from base
    php-gd-5.4.16-46.el7.x86_64 from base
    t1lib-5.1.2-14.el7.x86_64 from base

我还发现了另一个代码:

sudo yum install php7.2-gd

但是结果是这样的:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.buana.web.id
 * epel: epel.mirror.angkasa.id
 * extras: mirror.buana.web.id
 * remi-safe: mirror.xeonbd.com
 * updates: mirror.buana.web.id
No package php7.2-gd available.
Error: Nothing to do

我该怎么办。 我需要将图像调整为智能手机尺寸和ipad尺寸。 所以我用“干预图像插件” ..有解决方案吗?

假设存储库remi-php72仍然启用:

可以安装:

sudo yum install php72-gd
  Installed: php-common-7.2.12-1.el7.remi.x86_64 (@remi-php72) 

因此,您需要启用remi-php72存储库并从中安装php-gd软件包。

向导所述

yum-config-manager --enable remi-php72
yum install php-gd

它似乎是简单的安装问题,我建议您重新安装PHP,php-devl,然后尝试在新系统上安装php-gd。

暂无
暂无

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

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