What is bsddb185 in Python

What packages / libraries should I install before compiling Python from source?

Every now and then I have to install a new Ubuntu (I've used it for both the desktop and the servers) and keep forgetting a couple of libraries that I should have installed before compiling, which means I have to recompile and get it annoying.

Now I want to make a full list of all the library packages to install before Python is compiled (and, best of all, how optional they are).

This is the list I compiled with the help and digging below. It's complete for at least Ubuntu 10.04 and 11.04:

For Python 3.2 and higher:

More optional:

Ubuntu has no packages for Berkeley database v1.8.5, nor (for obvious reasons) the Sun Audio hardware, so the and modules are still not built on top of Ubuntu, all other modules are installed with the above packages as well built.


In Ubuntu 14.04 even more patches for Python 2.6 and 2.7 etc. are needed. I would recommend trying pyenv instead. It contains a script (located in). This allows you to install any version of Python as follows:

Where 2.7.8 is the version and / opt / python27 is the path under which it will be installed. Pyenv will download the Python version and apply the necessary patches for you.


For Python 2.5 and Python 2.6, LDFLAGS must also be set on Ubuntu 11.04 and higher so that the new layout can be used with multiple archives:

For Python 2.6, 2.7, and 3.0, you must explicitly enable SSL after running the script and before running it. There are lines in it like this:

Comment out these lines and change the SSL variable to:

Python 2.6 and 3.0 also need to change Modules / _ssl.c to work with OpenSSL 1.0, which is used in Ubuntu 11.10. Around line 300 you will find the following:

Change that to:

This disables SSL_v2 support which is apparently gone in OpenSSL1.0.

Python 2.4 (yes, I still have some old projects that require 2.4) needs this patch for setup.py:

And it needs to be compiled with: