Configuring PHP GD on Ubuntu 11.04 "Natty"

This is a post for the "so I can find it again" category. (It is also a test for the new blogging infrastructure that Oracle migrated to last week).

After an upgrade to Ubuntu 11.04 on one 32 bit machine, my simple custom script to build PHP 5.3 from source failed. The script isn't complex, pulling in a couple of extensions that I use for sanity checking the OCI8 extension. I use the GD extension to generate some simple graphs.

My configuration command was like:

./configure ... --with-gd --with-jpeg-dir --with-png-dir ...

which gave the error:

configure: error: libjpeg.(a|so) not found

This release of Ubuntu has moved around some standard libraries. After some fiddling around, checking the 'configure' options and the GD extension config.m4 file intention, the solution for me was simple. Add the --with-libdir=lib/i386-linux-gnu option to configure. I haven't tried this with other extensions so YMMV.

Update: Rasmus just merged a patch to gd that should make the --with-libdir option unnecessary

Comments:

I did things a little bit different with some symlinks for the required so's: http://pastebin.com/bh87r5Lw

Posted by guest on May 11, 2011 at 10:46 AM PDT #

Post a Comment:
Comments are closed for this entry.
About

Tourists looking out over an Opal mine
I'm a Product Manager in Server Technologies, working on scripting languages and developer-access.
Email: christopher.jones@oracle.com
Twitter: http://twitter.com/ghrd
Book: Free PHP Oracle book
Download: PHP Linux RPMs with the OCI8 extension
Links: OTN PHP Developer Center

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today