Getting Python2.5 to Build with sqlite3 and zlib on Ubuntu Natty 2.5

I had a really hard time finding this, so I’m posting it here:

First one must install all the proper packages on Natty (these are the packages needed for zlib and sqlite in general, not just specifically for Python):

sudo apt-get install zlibc zlib1g zlib1g-dev
sudo apt-get install sqlite3-dev

Then one must add an LDFlag to the new lib directories (apparently Natty has a new directory for X86_64 lib files):

after the ./configure open your Makefile and find the line with

edit to LDFLAGS = -L/usr/lib//x86_64-linux-gnu

and make

Credit for the above snippet goes to Awin Abi and source is below:

Basically, setting up Python2.5 ( and presumably any version of Python) properly involves downloading the proper package libraries , then building Python2.5 with those packages. In order to do this, the LDFlags variable must have the new library location (the /usr/lib/x86-64-linux-gnu) for Natty and 64-bit processors added.

I have not tried this on a 32-bit machine. This may not be required then, or you may need to point the flag to load the proper directory.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s