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.
5 Comments
syok on February 28th, 2009
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
Saifur on March 3rd, 2009
@syok, you can download the package manually and then configure your PHP.
aballeras on June 4th, 2009
hi saifur. your article is a great help. thanks alot.
cbemerine on September 14th, 2009
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

I am a simple man working in IT field. I love Music, playing soccer, traveling new places. By profession I am a software engineer and enjoy my job. Currently I am doing my M Sc in Software Engineering in Blekinge Institute of Technology, Sweden. I love researching on new technologies such as programming languages, architectures, tools and techniques.
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.