$ cd /usr/local/srcAnd I saw the first problem:-
$ sudo wget http://www.python.org/ftp/python/2.5.5/Python-2.5.5.tgz
$ sudo tar -xzf Python-2.5.5.tgz
$ cd Python-2.5.5
$ sudo ./configure --prefix=/usr/local/python2.5
$ sudo make
$ sudo make test
test_zlib skipped -- No module named zlibThis meant I also had to install zlib:-
$ cd /usr/local/srcThis improved things a bit, but I still had a failure with the zlib test:-
$ sudo wget http://zlib.net/zlib-1.2.5.tar.gz
$ sudo tar -zxf zlib-1.2.5.tar.gz
$ cd zlib-1.2.5
$ sudo ./configure
$ sudo make
$ sudo make install
test test_zlib failed -- Traceback (most recent call last):A bit more research showed that changes in zlib after 1.2.3 caused the zlib test to fail. Sadly the fix was not being backported to 2.5, meaning that I had to change the test manually:-
File "/usr/local/src/Python-2.5.5/Lib/test/test_zlib.py", line 72, in test_baddecompressobj
self.assertRaises(ValueError, zlib.decompressobj, 0)
AssertionError: ValueError not raised
$ cd/usr/local/src/Python-2.5.5/Lib/testGo to line 72, change 0 to -1 on that line, save and exit.
$ sudo joe test_zlib.py
Now the zlib test passed, and Python 2.5 can be installed:-
$ cd /usr/local/src/Python-2.5.5
$ sudo make install
No comments:
Post a Comment