How to install PHP GD on Linux (Ubuntu)

On Ubuntu Linux, if you get a warning from PHP or a PHP framework about a missing php-gd library, try:

# sudo apt-get install php5-gd

This worked on Ubuntu Precise. It pulled in several dependencies and updated a few packages as well. These dependencies may vary depending on what you’ve already got installed on your system.

This linuxquestions forum topic pointed me in the right direction.

Tags: