Installing the GD image library

Hi - I’m hosting a WordPress site on my droplet (Ubuntu 14.04 x64). On the site I installed a plugin called NextGEN Gallery (more info on that you can check it out but basically it is a photo gallery plugin:

In my local site running on MAMP the plugin functions normally and the site works. However, in my live environment whenever I attempt to use the plugin to create a new gallery (including photos) I get this error from the plugin:

“The site does not support the GD Image library. Please ask your hosting provider to enable it.”

I read through the support forums for the plguin and found a number of people who have had the same issue depending on the hosting provider they were using.

I have been searching the community here for this issue and came across this post which seems to be my exact question:

I’ve extremely unfamiliar and uncomfortable doing this sort of thing so I just want to be certain I follow the right steps here.

It sounds like first I need to use this command to install the GD library: sudo apt-get install php5-gd

Then I need to restart apache2 using this command: sudo service apache2 restart

At this point the above thread loses me. It sounds like I may need to make some change to my php.ini file which lives here: etc/php5/apache2. But it’s unclear to me if I really need to do that as I have really no idea if I am or am not using the default php.ini file.

Any help would be greatly appreciated as I really don’t know what I am doing and I don’t want to mess anything up!

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

It seems the package is outdated. I am facing below error -

Package php5-gd is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

Just wanted to follow up and say this did help me figure this out!

It sounds like you are on the right track. In most cases, all you need to do is:

sudo apt-get install php5-gd
sudo service apache2 restart

You only need to edit php.ini file if you are not using the default. Running the following commands should be quite safe. Give it a shot, and if it doesn’t resolve the issue let us know and we can take it from there.