# Install build tools, debian helpers and fakeroot  
apt-get install build-essential debhelper fakeroot  
# Get PHP source (it should go into /usr/src)  
cd /usr/src  
apt-get source php5  
# Install all packages required to build PHP5  
apt-get build-dep php5  

#Now what we need is to update compile options,  
# so we need to edit debian/rules file:  
cd php5-5.2.6.dfsg.1  
vim debian/rules  

#locate the line having "--with-gd=shared,/usr --enable-gd-native-ttf "  
# replace with "--with-gd=shared --enable-gd-native-ttf "  
# that's remove reference to /usr so that bundled library is used  

# compile (drink some coffee, walk you dog, see the latest House episode)  
dpkg-buildpackage -rfakeroot  
   
# install the new php5-gd package  
cd ..  
dpkg -i php5-gd_5.2.6.dfsg.1-3ubuntu4.2_i386.deb  

# finally restart apache  
/etc/init.d/apache2 restart  
Tags
Comments
Write the first comment
Leave a trace
Name *
Email *
Website
Leave me a comment *
 
All comments are subject to editorial review
Post being viewed right now
Item date: 04.10.2009
Views: 266
Item date: 27.10.2009
Views: 91
Item date: 16.06.2009
Views: 1868
Item date: 10.04.2009
Views: 782
Item date: 10.04.2009
Views: 779
Item date: 15.05.2009
Views: 1474
Item date: 18.06.2009
Views: 507
Item date: 27.09.2009
Views: 1609
Item date: 05.02.2009
Views: 782
Item date: 20.07.2009
Views: 1791