PHP 5.2 on Ubuntu 11.04 Oneiric

For the time being, we need PHP 5.2 on some of our servers. From version 10.04 Lucid Lynx, Ubuntu started shipping PHP 5.3. I found info on how to install PHP on Lucid by using the packages from the previous version of Ubuntu, 9.10 Karmic Koala.

However, those packages are no longer online, Karmic is long past end of life. The only currently supported release that still has PHP 5.2 is 8.04 Hardy. I was able to get PHP 5.2.4 installed (eventually) using the packages from hardy.

I created two files /etc/apt/sources.list.d/hardy.list and /etc/apt/preferences.d/pin-php52. Then the following met my needs:

sudo apt-get install apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common libapache2-mod-php5 php5-cli php5-common php5-curl php5-gd php5-mcrypt php5-mhash php5-mysql

I constructed the two files mostly from things I read about how to get packages from Karmic to install on Lucid. YMMV.

Ubuntu Jaunty and pidgin-facebookchat 1.61

I was able to install pidgin-facebookchat 1.61 on Ubuntu Juanty Jackalope (9.04) by first installing the relevant libjson-glib-1.0-0 from Karmic. To find the correct deb look at the different builds on the right hand side of the page. In my case on 64-bit Ubuntu the relevant deb was this one, the 32-bit version is here.

I had to install the glib-json deb first. Otherwise the pidgin-facebookchat deb warned of an unsatisfiable dependency.

It looks like pidgin-facebookchat 1.6x is being included in Ubuntu Karmic but I’d guess it won’t be backported to Jaunty.