0

I am attempting to compile python 2.6.8 in Redhat 5 linux box.

At the end of the compilation, I got these messages;

Failed to find the necessary bits to build these modules:
_bsddb             _curses            _curses_panel
_hashlib           _sqlite3           _ssl
_tkinter           bsddb185           bz2
dbm                dl                 gdbm
imageop            readline           sunaudiodev

Based on the names above, I used yum search and find some rpm packages to fulfill the dependencies

ncurses

ncurses-5.5-24.20060715.x86_64 ncurses-devel-5.5-24.20060715.i386

gdbm gdbm-1.8.0-26.2.1.x86_64

readline readline-5.1-3.el5.x86_64

b2 bzip2-1.0.3-4.el5_2.x86_64 bzip2-devel-1.0.3-4.el5_2.x86_64

However I cannot do not have luck with the rest them.

Is there any technique in discovering the dependencies? Is there any web resource available to look up the rpm packages?

3
  • Can I ask why you're trying to build such an old version of Python? The current versions are 2.7.5 and 3.3.2...
    – MattDMo
    Jun 4, 2013 at 1:51
  • I am working in a corporate environment and 2.6.x is the 'official' version we use Jun 4, 2013 at 2:06
  • I'm sorry about that...
    – MattDMo
    Jun 4, 2013 at 2:09

2 Answers 2

1
  1. Use the deplist command to list a package dependencies:

yum deplist <package>

2. Or use the repoquery tool from the yum-utils package:

repoquery --requires <package>

1

RPMfind is going to be your best bet looking for RPMs. Make sure you get the -devel versions as well as the main package, as the compiler will be looking for the headers and/or libraries that come in those packages. They happen to have RPMs for Python 2.6.8 on i586 and x86_64 platforms, originally built for OpenSUSE, but potentially useful for you.

As far as Python is concerned, unless you have a specific need for 2.6, I'd highly recommend using the most up-to-date, fully bug-patched and feature-filled versions. 2.7.5 is the current release for the maintenance 2.x series, and 3.3.2 is the latest version of Python 3. To find info on modules that failed to build, look in the Python-2.7.5/Modules directory (or whatever version you end up building) and look for .c files related to the module name. For example, in my Python-3.3.2/Modules directory, I have _tkinter.c which says right at the top "Only Tcl/Tk 8.3.1 and later are supported" so now I know what package names and versions to search for.

Good luck!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .