问题
i need to run some old python programs on a ubuntu 10.04 system. it seems, that there are no python 2.3 packages for ubuntu 10.04 available. so i got python 2.3 directly from python.org: http://www.python.org/download/releases/2.3/
but "make" python fails with a buffer overflow.
has anyone suggestions how to get python 2.3 to work on ubuntu 10.04?
回答1:
This appears to be an old bug in Python 2.3. From here: https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/286334
The solution is to run configure with BASECFLAGS=-U_FORTIFY_SOURCE.
./configure BASECFLAGS=-U_FORTIFY_SOURCE
Then run make as you usually would.
回答2:
You could decompile your python compiled files back to source. That way they will work in any python version up to 2.7+, probably unchanged.
来源:https://stackoverflow.com/questions/4934925/using-python-2-3-on-ubuntu-10-04