Install A Particular Version of PHP – Debian Squeeze

Recently ran into an issue where I needed a specific version of PHP on a base Debian 6 install. The default is php 5.3.3 but what I wanted to install was php 5.3.8 for some testing.

Dotdeb maintains updated .deb packages for many LAMP applications. They also maintain older versions in their archives. This is what I had to do, which I think can be extrapolated to any other package you need.

Use wget to download all the .deb packages you need.

wget -r -l1 --no-parent -A ".deb"

aptitude install libonig2 libqdbm14 libltdl7 libmcrypt4 libcurl3 #Some dependencies from the stable branch

dpkg -i php5-cli_5.3.8-1~dotdeb.2_amd64.deb php5-common_5.3.8-1~dotdeb.2_amd64.deb php5-gd_5.3.8-1~dotdeb.2_amd64.deb php5-mysql_5.3.8-1~dotdeb.2_amd64.deb php5-mcrypt_5.3.8-1~dotdeb.2_amd64.deb php5-mcrypt_5.3.8-1~dotdeb.2_amd64.deb libapache2-mod-php5_5.3.8-1~dotdeb.2_amd64.deb php5-curl_5.3.8-1~dotdeb.2_amd64.deb php5-common_5.3.8-1~dotdeb.2_amd64.deb

One Thought on “Install A Particular Version of PHP – Debian Squeeze

  1. knützen on September 25, 2014 at 2:50 pm said:

    thanks a lot. this helped me.

Leave a Reply

Your email address will not be published. Required fields are marked *


Post Navigation