Mirrored as part of a study of Minetest events of 2010 to 2019 and people involved, and in connection with a related book, events in 2017 to 2018, in particular, conferring upon host legal rights related to Fair Use.

Building Python on Debian or Ubuntu

I had to compile python with debugging information in it and had to find out a few packages to install, which were not well documented. What you basically get is:

[pera@humppa Python-2.6.4]$ ./configure --enable-shared --with-pydebug
...
Failed to find the necessary bits to build these modules:
_hashlib _sqlite3 _ssl
bsddb185 bz2 gdbm
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

Well, that’s not much said. Here’s what to do on debian or ubuntu (this is likely to work with at least python 2.5 and 2.6) (the patch is from [1]):


$ apt-get build-dep python2.5
$ wget http://celer.oni.biz/~celeron55/random/2010-01/python2.6-disable-old-modules.patch
$ patch -p1 < python2.6-disable-old-modules.patch
$ make
...etc

References:
[1] http://www.lysium.de/blog/index.php?/archives/229-Installing-Python-2.6-on-Ubuntu-8.04.html
[2] http://old.nabble.com/how-to-compile-python3.0-td23213995.html

Leave a Reply