title: How to install PHP GD in Ubuntu
body: <p>I want to convert the image in low resolution with GD. I'm working on IBM Server under these speces 
  Version: PHP 7.0.15-0ubuntu0.16.04.4 (cli) ( NTS )<br>
  and I have also comment out the extension from php.ini but can't enabled the GD on php server. 
  I Just received this error. </p>
  
  <p><strong>Run Command:</strong> sudo apt-get install libgd</p>
  
  <p>Reading package lists... Done</p>
  
  <p>Building dependency tree
  Reading state information... Done
  E: Unable to locate package libgd</p>
  
  <p>Second Command When I run give this message:</p>
  
  <p>1) packages have unmet dependencies</p>
  
  <p>and after running this command received this:</p>
  
  <p><strong>Command:</strong> sudo apt-get install libgd-dev</p>
  
  <p>Reading package lists... Done</p>
  
  <p>Building dependency tree</p>
  
  <p>Reading state information... Done</p>
  
  <p>You might want to run 'apt-get -f install' to correct these:</p>
  
  <p>The following packages have unmet dependencies:
   libgd-dev : Depends: libgd3 (= 2.1.1-4ubuntu0.16.04.6) but it is not going to be installed</p>
  
  <pre><code>         Depends: libpng-dev
  
           Depends: libz-dev
  
           Depends: libjpeg-dev
  
           Depends: libfreetype6-dev but it is not going to be installed
  
           Depends: libxpm-dev but it is not going to be installed
  
           Depends: libx11-dev but it is not going to be installed
  
           Depends: libxt-dev but it is not going to be installed
  
           Depends: libfontconfig-dev
  
           Depends: libvpx-dev but it is not going to be installed
  
           Depends: libtiff-dev
  </code></pre>
  
  <p>linux-image-virtual : Depends: linux-image-4.4.0-81-generic but it is not going to be installed</p>
  
  <p>E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).</p>
  
  <p>Cause of this Problem:</p>
  
  <p>PHP Fatal error:  Uncaught Error: Call to undefined function imagecreatefromstring()  </p>
  
  <p>Note please anyone tell me the step-by-step command to enable this GD Library on my this Linus machine. 
  thanks alot</p>