Skip to content

Building Python 2.4.3 on Ubuntu 12.04

The ConnectPort series of gateways from Digi run an embedded version of Python 2.4. Python 2.4 is no longer readily available in recent distros so here's how I installed it. Having had to do this painful exercise twice now so writing it down to make it easier next time.

  1. Download 2.4.3 source from python.org and unpack.
  2. Install prereqs: sudo apt-get install zlib1g-dev
  3. Configure. ./configure BASECFLAGS=-U_FORTIFY_SOURCE -with-zlib=/usr/include
  4. Edit Modules/Setup and uncomment the line starting with zlib
  5. Build: make
  6. Install: sudo make install
  7. Remove new symlink that install creates. sudo rm /usr/local/bin/python. The symlink in /usr/bin/python will still point to 2.7ish.

Python 2.4 can now be invoked with python2.4.