$ tar xf Python-2.5.6.tar.bz2
$ cd Python-2.5.6/
$ ./configure --disable-ipv6 --disable-shared --enable-unicode
$ make
running build_ext
/usr/include/sqlite3.h: version 3.7.7
Traceback (most recent call last):
File "./setup.py", line 1545, in
main()
File "./setup.py", line 1540, in main
'Lib/smtpd.py']
File "/usr/local/src/works/Python-2.5.6/Lib/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/local/src/works/Python-2.5.6/Lib/distutils/dist.py", line 974, in run_commands
self.run_command(cmd)
File "/usr/local/src/works/Python-2.5.6/Lib/distutils/dist.py", line 994, in run_command
cmd_obj.run()
File "/usr/local/src/works/Python-2.5.6/Lib/distutils/command/build.py", line 112, in run
self.run_command(cmd_name)
File "/usr/local/src/works/Python-2.5.6/Lib/distutils/cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "/usr/local/src/works/Python-2.5.6/Lib/distutils/dist.py", line 994, in run_command
cmd_obj.run()
File "/usr/local/src/works/Python-2.5.6/Lib/distutils/command/build_ext.py", line 290, in run
self.build_extensions()
File "./setup.py", line 97, in build_extensions
self.detect_modules()
File "./setup.py", line 810, in detect_modules
sqlite_libdir = [os.path.abspath(os.path.dirname(sqlite_libfile))]
File "/usr/local/src/works/Python-2.5.6/Lib/posixpath.py", line 119, in dirname
return split(p)[0]
File "/usr/local/src/works/Python-2.5.6/Lib/posixpath.py", line 77, in split
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
make: *** [sharedmods] Error 1
コケる c⌒っ゚Д゚)っ
ライブラリパスを指定
$ make distclean
$ LDFLAGS="-L/usr/lib/i386-linux-gnu" ./configure --disable-ipv6 --disable-shared --disable-unicode
$ make
creating build/scripts-2.5
copying and adjusting /usr/local/src/works/Python-2.5.6/Tools/scripts/pydoc -> build/scripts-2.5
copying and adjusting /usr/local/src/works/Python-2.5.6/Tools/scripts/idle -> build/scripts-2.5
copying and adjusting /usr/local/src/works/Python-2.5.6/Lib/smtpd.py -> build/scripts-2.5
changing mode of build/scripts-2.5/pydoc from 664 to 775
changing mode of build/scripts-2.5/idle from 664 to 775
changing mode of build/scripts-2.5/smtpd.py from 664 to 775
$
こんどは成功(`・ω・´)
$ sudo make install
:
Compiling /usr/local/lib/python2.5/zipfile.py ...
make: *** [libinstall] Error 1
が、しかし・・・ make install 失敗(´・ω・`)
しょうがないのでエラーを無視でaltinstall
$ sudo make -i altinstall
changing mode of /usr/local/bin/smtpd.py to 775
running install_egg_info
Removing /usr/local/lib/python2.5/lib-dynload/Python-2.5.6-py2.5.egg-info
Writing /usr/local/lib/python2.5/lib-dynload/Python-2.5.6-py2.5.egg-info
これでよしとしよう