title: heroku installing gd extension failed
body: <p>I'm trying to install <code>gd</code> (or <a href="https://devcenter.heroku.com/articles/php-support" rel="nofollow">ext-gd</a>) libraries on <code>heroku</code>.</p>
  
  <p>When I try to install them using composer (I have it as follows)</p>
  
  <pre><code>{
      "name": "cool/app",
      "type": "project",
      "require": {
          "ext-gd": "dev-master" (tried also installing "gd":"*", "ext-gd" : "*")
      },
      "license": "2016",
      "authors": [
          {
              "name": "Dario",
              "email": "my@email.it"
          }
      ],
      "minimum-stability": "dev"
  }
  </code></pre>
  
  <p>I got </p>
  
  <pre><code>Problem 1
  - The requested PHP extension ext-gd * is missing from your system. Install or enable PHP's gd extension.
  </code></pre>
  
  <p>So, tried to install from apt-get (<code>sudo apt-get install php7-gd</code>), but I dont have sudo permissions as I don't know the root heroku password.</p>
  
  <p>Any work around on this?</p>
  
  <p><strong><em>EDIT</em></strong></p>
  
  <p>To explain better what I've done, here's the entire commands list</p>
  
  <pre><code>$ heroku run bash
  Running bash on ⬢ app... up, run.1644 (Free)
  ~ $ composer init
  
  
    Welcome to the Composer config generator  
  
  
  
  This command will guide you through creating your composer.json config.
  
  Package name (&lt;vendor&gt;/&lt;name&gt;) [app/app]: 
  Description []: 
  Author [, n to skip]: n
  Minimum Stability []: 
  Package Type (e.g. library, project, metapackage, composer-plugin) []: 
  License []: 
  
  Define your dependencies.
  
  Would you like to define your dependencies (require) interactively [yes]? 
  Search for a package: ext-gd
  
  Found 15 packages matching ext-gd
  
     [0] stil/gd-text
     [1] gd/plesk-bundle
     [2] quince/persian-gd
     [3] xepan/gd-text
     [4] zgldh/gd-text-for-chinese
     [5] ext-calendar
     [6] ext-iconv
     [7] ext-dbus
     [8] ext-xml
     [9] ext-opendkim
    [10] ext-mcrypt
    [11] ext-openssl
    [12] ext-ssh2
    [13] ext-mongo
    [14] ext-mbstring
  
  Enter package # to add, or the complete package name if it is not listed: ext-gd
  Enter the version constraint to require (or leave blank to use the latest version): *
  Search for a package: 
  Would you like to define your dev dependencies (require-dev) interactively [yes]? no
  
  {
      "name": "u11706/app",
      "require": {
          "ext-gd": "*"
      }
  }
  
  Do you confirm generation [yes]? 
  ~ $ composer update
  Loading composer repositories with package information
  Updating dependencies (including require-dev)
  Your requirements could not be resolved to an installable set of packages.
  
    Problem 1
      - The requested PHP extension ext-gd * is missing from your system. Install or enable PHP's gd extension.
  
  ~ $ composer update --ignore-platform-reqs
  Loading composer repositories with package information
  Updating dependencies (including require-dev)
  Nothing to install or update
  Writing lock file
  Generating autoload files
  </code></pre>
  
  <p>And I'm unable to use the <code>gd</code> libraries as php (Laravel) says <code>Call to undefined function App\Http\Controllers\imagecreatefrompng()</code></p>
  
  <p>If I run <code>composer require ext-gd</code> from my local computer I get</p>
  
  <pre><code>Using version ^0.0.0 for ext-gd
  ./composer.json has been updated
  Loading composer repositories with package information
  Updating dependencies (including require-dev)
  Nothing to install or update
  Writing lock file
  Generating autoload files
  </code></pre>