TurnKey Linux Virtual Appliance Library

How to install GD Library

Swedie's picture

Installed Turnkey Lamp v 2009-02 and it has everything I want except for GD library.

What is the simplest way for me to add support for GD library in PHP?

I can't find the libraries anywhere and no .ini file to modify to add support for GD lib like you do on a windows machine.

Alon Swartz's picture

Install the php5-gd package

Just install the php5-gd package:
apt-get update
apt-get install php5-gd
It just so happens I am familier with the package, but if I wasn't, I would have done something like:
$ apt-cache search php | grep gd
php5-gd - GD module for php5
You can also use Ubuntu's package web interface: http://packages.ubuntu.com

Swedie's picture

Thank you! A bummer right

Thank you! A bummer right now though is that I don't have internet on the server. Can I download the php5-gd package, move it manually onto the server, and then install it in a simple way?
Alon Swartz's picture

yes, but its going to require manual dependency resolution

You will have to download the php5-gd deb package, and all of its dependencies (and the dependencies of the dependencies recursively) of the packages not yet installed on the appliance.

The list of dependencies and download links are available at this link, and you can find the deb packages in the Ubuntu package archive.

You can find out what packages are installed by either looking at the appliance manifest (see link on appliance download page), or by running dpkg-query -W

Once you have downloaded and copied the packages to the appliance, you can install them using dpkg:
dpkg -i PACKAGE.deb

Good luck!
Guest's picture

I had this same problem while

I had this same problem while trying to set up OpenCart on a turnkey lamp install; it wouldn't detect either php5-gd or php5-curl. The curl extension wasn't installed, so a quick install fixed that. However, GD was installed, but OpenCart wouldn't detect it. I fixed it by uninstalling php5-gd by typing 'apt-get autoremove php5-gd' then reinstalling it with 'apt-get install php5-gd'; immediately fixed the problem. Just something to try if you're having a similar problem but the extension(s) are installed.

Guest's picture

Exactly what I was looking

Exactly what I was looking for, thanks! Must of had the same lamp install.

Guest's picture

GD had to be removed and reinstalled

Thanks to Aaron Arlof

I am installing osTicket on a Turnkey LAMP Stack and it requires GD-lib to show the Captchas for new tickets.

I first did what Alon told to do:

apt-get update
apt-get install php5-gd

but I got the same error "The GD extension required"

Then i removed GD-li as per Aaron advice:

apt-get autoremove php5-gd

then reinstalled it

apt-get install php5-gd

Now osTicket works fine!

Guest's picture

What about nginx?

do you know how to configure GD Library with FreeType please? 

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)