如何在Heroku上安装GD [英] How to install GD on Heroku

查看:164
本文介绍了如何在Heroku上安装GD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Laravel 5.3并试图进行一些图像处理。我得到这个错误:GD库扩展不适用于这个PHP安装。



我试过把gd放在我的composer.json中。

 require:{
php:> = 5.6.4,
laravel / framework:5.3。 *,
mews / purifier:〜2.0,
vinkla / hashids:^ 2.4,
barryvdh / laravel-debugbar:^ 2.2,
fzaninotto / faker:〜1.4,
intervention / image:^ 2.3,
gd:*
},

并且它不起作用。我也试过:

 ext-gd:*

,那也没用。我看了这个页面 https://devcenter.heroku.com/articles/php-support它说:

以下内置扩展已经构建为共享,可以通过composer.json(内部标识符名称在括号中) p>

GD(gd)

解决方案

添加 gd:*复制到composer.json并执行作曲家更新



这不起作用添加ext-gd:*并且做一个作曲家更新


I am running Laravel 5.3 and trying to do some image manipulation. I get this error: GD Library extension not available with this PHP installation.

I've tried putting gd in my composer.json

"require": {
    "php": ">=5.6.4",
    "laravel/framework": "5.3.*",
    "mews/purifier": "~2.0",
    "vinkla/hashids": "^2.4",
    "barryvdh/laravel-debugbar": "^2.2",
    "fzaninotto/faker": "~1.4",
    "intervention/image": "^2.3",
    "gd": "*"
},

and it didn't work. I also tried:

"ext-gd": "*" 

and that didn't work either. I looked at this page https://devcenter.heroku.com/articles/php-support and it says:

The following built-in extensions have been built "shared" and can be enabled through composer.json (internal identifier names given in parentheses)

GD (gd)

解决方案

Add "gd": "*" to composer.json and perform composer update

If that doesn't work add "ext-gd":" *" and do a composer update

这篇关于如何在Heroku上安装GD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆