Heroku-如何在Heroku php应用程序上启用gd?

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (2)
  • 关注 (0)
  • 查看 (25)

当我git push heroku master,我得到:

我的composer.json: { "require": { "gd": "*" } }

但是当我git push heroku master,我得到:

-----> Installing dependencies...
       Composer version 1.0.0-alpha9-19-g10401d5 2014-12-09 11:32:02
       Loading composer repositories with package information
       Installing dependencies
       Your requirements could not be resolved to an installable set of packages.

         Problem 1
           - The requested package gd could not be found in any version, there may be a typo     in the package name.

       Potential causes:
        - A typo in the package name
        - The package is not available in a stable-enough version according to your minimum-    stability setting
          see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

       Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

 !     Push rejected, failed to compile PHP app

我如何在heroku上启用gd?

提问于
用户回答回答于
用户回答回答于

只需在composer中添加GD作为依赖项(require),不会加载扩展名GD。它只是说明这个软件包需要启用gd。“ext-gd”只是一个虚拟包,并非真实存在。

你必须在你的平台上安装它。

扫码关注云+社区