10. October 2011

Debian Testing 64bit – php5-gd – libjpeg version Unknown

I found strange issue with php5-gd during upgrade of Linux Debian Testing.

php5-gd package is responsible for rendering and manipulation of images in PHP apps. Problem was that after installation phpinfo() displayed weird message:

libjpeg version: unknown

No JPEG manipulation was working. I found Sergio’s solution for 32 bit version of Debian Linux. The trick is in replacing someĀ so files from Suse.

Here is updated version for Debian 64bit:

cd /tmp
wget ftp://ftp.icm.edu.pl/vol/rzm1/linux-opensuse/distribution/11.3/repo/oss/suse/x86_64/php5-gd-5.3.2-1.31.x86_64.rpm
alien php5-gd-5.3.2-1.31.x86_64.rpm
dpkg -i php5-gd_5.3.2-2.31_amd64.deb
cp /usr/lib64/php5/extensions/gd.so /usr/lib/php5/20090626/

wget ftp://ftp.icm.edu.pl/vol/rzm1/linux-opensuse/distribution/11.3/repo/oss/suse/x86_64/libpng14-14-1.4.3-2.1.x86_64.rpm
alien -d libpng14-14-1.4.3-2.1.x86_64.rpm
dpkg -i libpng14-14_1.4.3-3.1_amd64.deb
mv /usr/lib64/libpng14.so* /usr/lib

/etc/init.d/apache2 restart