How to install GD on Heroku

谁说我不能喝 提交于 2020-02-01 03:08:07

问题


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)


回答1:


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

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



来源:https://stackoverflow.com/questions/39184760/how-to-install-gd-on-heroku

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!