I'm getting the following error when trying to compile Python 3.3.2 in CentOS 5.9 x86_64:
Failed to build these modules: _decimal
I get this error when executing the "make" command (after the ./configure command).
Doing a Google search, I have found little information. It seems that the problem can be related to an old version of gcc, and can be solved upgrading the version of the linux distribution. But I must stick with CentOS 5.9, and I am already using the latest version of gcc available for CentOS 5.9 (gcc version 4.1.2).
Does anybody have been able to install Python 3.3.2 in CentOS 5.9?
Thank you for your help.
Best Answer
Ok, I found a way.
You can install a newer version of gcc (4.4.7) along the default version that comes with CentOS 5.9, using only the official packages of CentOS 5.9 and without overwriting the installation of gcc 4.1.2.
Here are the steps:
1.- Using yum, install the following packages (may be you can get along with fewer packages, but I tried installing these 3):
2.- Set the CC environment variable to point to the gcc44 compiler:
3.- Run the commands as indicated in the README file of the Python 3.3.2 tarball:
Now, after the first "make" you should not see the error message related to the "_decimal" module. And "make test" should complete successfully.
4.- Unset the CC environment variable:
And that's it.