I'm new to python and ubuntu. I'm trying to install python 2.6.5 on ubuntu 12.10. I already have python 2.7.3 and am trying to install 2.6.5 side by side the existing python. I get the following error when executing make:
Failed to find the necessary bits to build these modules:
_bsddb bsddb185 dl
imageop linuxaudiodev ossaudiodev
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Failed to build these modules:
_curses _curses_panel _ssl
I am most worried about the _ssl module. I used ./configure --with-ssl, as mentioned in another post, but the message is still the same. Any pointers appreciated.
Additional note: make used to complain that it could not build bz2 either, but I fixed that with this post entry recompiling bzip2. Now it's down to _ssl. I'm not sure if I need _curses.
Edit: Found make log file and it looks like this is due to the fact that python 2.6.5 supports ssl v2, while this support was removed in Ubuntu. Log file contains:
*** WARNING: renaming "_ssl" since importing it failed: build/lib.linux-x86_64-2./_ssl.so: undefined symbol: SSLv2_method
This blog has python 2.6.8 rebuilt without the ssl v2 support. I'm trying their changes in the 2.6.5 source now.
Edit 2: Modifying 2.6.5 sources as noted above and removing ssl v2 support fixed the problem with _ssl module not building. Also, here is a list of packages I tried installing earlier:
apt-get install libreadline-dev
apt-get install libssl-dev (already installed)
apt-get install libbz2-dev (already installed)
apt-get install build-essential (already installed)
apt-get install sqlite3
apt-get install tk-dev
apt-get install libsqlite3-dev
apt-get install libc6-dev (already installed)
apt-get install libgdbm-dev
apt-get install libncursesw5-dev
Here is full output from make:
running build
running build_ext
building '_curses' extension
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict prototypes -I. -I/tmp/nimbula/Python-2.6.5/./Include -I. -IInclude -I./Include -I/usr/local/include -I/tmp/nimbula/Python-2.6.5/Include -I/tmp/nimbula/Python-2.6.5 -c /tmp/nimbula/Python-2.6.5/Modules/_cursesmodule.c -o build/temp.linux-x86_64-2.6/tmp/nimbula/Python-2.6.5/Modules/_cursesmodule.o
building '_curses_panel' extension
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/tmp/nimbula/Python-2.6.5/./Include -I. -IInclude -I./Include -I/usr/local/include -I/tmp/nimbula/Python-2.6.5/Include -I/tmp/nimbula/Python-2.6.5 -c /tmp/nimbula/Python-2.6.5/Modules/_curses_panel.c -o build/temp.linux-x86_64-2.6/tmp/nimbula/Python-2.6.5/Modules/_curses_panel.o
Failed to find the necessary bits to build these modules:
_bsddb bsddb185 dl
imageop linuxaudiodev ossaudiodev
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Failed to build these modules:
_curses _curses_panel
running build_scripts
Edit 3: Yay, thank you guys for asking these questions. When I looked at the packages I installed earlier, one was clearly not looking good, the libncursesw5-dev (since it has a version in it and I got it from an old post). I tried the following and it solved the problem of _curses and _curses_panel not building:
apt-get install libncurses-dev
After installing libncurses-dev, I executed: make clean, ./configure --with-ssl, make.
Now the output from make is:
running build
running build_ext
Failed to find the necessary bits to build these modules:
_bsddb bsddb185 dl
imageop linuxaudiodev ossaudiodev
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
running build_scripts