How to install or add PHP GD support in Ubuntu

PHP is mainly a server side language which renders the code at server and throws the output to the client end through Apache or any other HTTP server. So, being a newbie we often suffer from GD support in Ubuntu. This are the following steps to install or add PHP GD support in Ubuntu.

$ apt-get install php5-gd

OR

$ sudo apt-get install php5-gd
$ /etc/init.d/apache2 restart

Now PHP GD support is ready to work.

About Saifur

A passionate software engineer, having several years of experiences in different area of software industry in Europe and Asia loves music, playing soccer, traveling new places, researching on new technologies such as programming languages, frameworks, software architectures and different project management practices.

, ,

7 Responses to How to install or add PHP GD support in Ubuntu

  1. Ron November 22, 2008 at 11:50 pm #

    Thanks for the article Mishu bhai :) is it possible for you to write another tutorial on how to install/add support php gd in linux enterprise edition.

  2. syok February 28, 2009 at 3:13 pm #

    My server is not connected to internet. and apt-get is not the way. how do i install gd library if my server is not connected to internet?
    tq

  3. Saifur March 3, 2009 at 5:59 am #

    @syok, you can download the package manually and then configure your PHP.

  4. aballeras June 4, 2009 at 8:43 am #

    hi saifur. your article is a great help. thanks alot.

  5. cbemerine September 14, 2009 at 8:07 am #

    For some reason the package would not install on my ubuntu 8.10 server. When I used sudo apt-get install php5-gd. So I became the superuser sudo -i and ran

    apt-get install php5-gd
    /etc/init.d/apache2 restart

    And it worked. Just FYI

  6. JereMe November 15, 2010 at 6:38 pm #

    All the same I found .. thanks for the advice

  7. andrea November 30, 2010 at 4:54 am #

    For me this don’t go…the extension is installed in this way but i don’t view any image…have you an alternative mode to install it?

Leave a Reply


*