Breaking News
Home / Sys Admin / Ubuntu / How to install PHP GD library in Ubuntu?

How to install PHP GD library in Ubuntu?

php

The PHP GD library provides a set of functions that are needed to manipulate (crop, re-size etc.) various types of images (PNG, JPG  etc. formats). This library is also needed for WordPress to create image thumbnails for the upload Media image files. If this library is not installed or not setup correctly, it will not create the thumbnails in WordPress.

You need to know the root password for installing this library. The following shows the terminal command and the installation log on installing the PHP GD library in Ubuntu.

livrona@livrona:~/projects/developerfeed/website/public/wp-content$ sudo apt-get install php5-gd
[sudo] password for livrona:
Reading package lists… Done
Building dependency tree       
Reading state information… Done
The following extra packages will be installed:
  libapache2-mod-php5 php5-cli php5-common php5-mysql
Suggested packages:
  php-pear php5-suhosin
The following packages will be upgraded:
  libapache2-mod-php5 php5-cli php5-common php5-gd php5-mysql
5 upgraded, 0 newly installed, 0 to remove and 134 not upgraded.
Need to get 6,731 kB of archives.
After this operation, 4,096 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main php5-cli amd64 5.3.10-1ubuntu3.9 [3,050 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main php5-mysql amd64 5.3.10-1ubuntu3.9 [76.7 kB]                                                                                                     
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main php5-gd amd64 5.3.10-1ubuntu3.9 [38.8 kB]                                                                                                        
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libapache2-mod-php5 amd64 5.3.10-1ubuntu3.9 [3,136 kB]                                                                                           
Get:5 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main php5-common amd64 5.3.10-1ubuntu3.9 [429 kB]                                                                                                     
Fetched 6,731 kB in 1min 52s (60.0 kB/s)                                                                                                                                                                         
(Reading database … 71210 files and directories currently installed.)
Preparing to replace php5-cli 5.3.10-1ubuntu3.6 (using …/php5-cli_5.3.10-1ubuntu3.9_amd64.deb) …
Unpacking replacement php5-cli …
Preparing to replace php5-mysql 5.3.10-1ubuntu3.6 (using …/php5-mysql_5.3.10-1ubuntu3.9_amd64.deb) …
Unpacking replacement php5-mysql …
Preparing to replace php5-gd 5.3.10-1ubuntu3.6 (using …/php5-gd_5.3.10-1ubuntu3.9_amd64.deb) …
Unpacking replacement php5-gd …
Preparing to replace libapache2-mod-php5 5.3.10-1ubuntu3.6 (using …/libapache2-mod-php5_5.3.10-1ubuntu3.9_amd64.deb) …
Unpacking replacement libapache2-mod-php5 …
Preparing to replace php5-common 5.3.10-1ubuntu3.6 (using …/php5-common_5.3.10-1ubuntu3.9_amd64.deb) …
Unpacking replacement php5-common …
Processing triggers for man-db …
Setting up php5-common (5.3.10-1ubuntu3.9) …
Setting up php5-cli (5.3.10-1ubuntu3.9) …
Setting up libapache2-mod-php5 (5.3.10-1ubuntu3.9) …
 * Reloading web server config apache2                               ServerName [ OK ]
Setting up php5-mysql (5.3.10-1ubuntu3.9) …
Setting up php5-gd (5.3.10-1ubuntu3.9) …
livrona@livrona:~/projects/developerfeed/website/public/wp-content$[pb_builder]

Check Also

How do you check Ubuntu version using command line?

Answer To check your Ubuntu version using the command line do the following: 1. Open …

Leave a Reply