views:

96

answers:

1

I am trying to install Python 2.6.5 on my web server running Debian 4.3.2.1-1. I unpacked the tarball, ran "./configure --prefix /usr/", then ran "make". I saw this message.

Failed to find the necessary bits to build these modules:
_bsddb             _hashlib           _ssl            
_tkinter           bsddb185           bz2             
dl                 imageop            readline        
sunaudiodev                                           
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

I thought it was not a big deal, so I went ahead with the rest of the installation, which I think was just running "make install" as root.

I tried running the new version of Python, and it worked, but some things acted funny. The usual keyboard shortcuts at the interactive prompt didn't work. I tried importing readline and the interpreter couldn't find it. Is there any way to make it work? I tried looking in setup.py like "make" told me, but I couldn't find any clues that were useful to me. I would really like to get readline to work. I don't really care about the other modules.

EDIT: This is on a DreamHost private server. They have some older versions of Python with readline, and they seem to work fine. I am trying to make it work with this new version.

I would like to add that I am kind of a Linux newbie, and I don't know much about installing packages, and using RPM or apt-get.

+3  A: 

You'll probably need to install the libreadline-dev virtual package for Debian 4 (etch) to be able to build python with libreadline support. Check the package dependencies for the Debian python2.6 source package here. It's for a newer version of Debian so not all of the same versions will be available in etch but you should be able to hunt down the closest versions available there to be able to build most of the other missing modules. Or you could try a dry run of installing the current testing (squeeze) version of python2.6 and see how many dependencies it brings along and if you're OK with upgrading those on your system.

Ned Deily
I tried that and it worked. Thank you. In case anyone needs to know, I installed libreadline-dev by running the command "aptitude install libreadline-dev" as root.
mikez302