CentOs

CentOS5.7 で Trac

centOS5.7にpython2.6を導入後mod_pythonをいれたら以下のエラーで進まず

[Fri Dec 23 13:20:07 2011] [error] [client 127.0.0.1] PythonHandler 続きを読む

CentOS5.7へPython2.6を導入

centOSはpython2.4なので2.6へ

$ wget http://python.org/ftp/python/2.6/Python-2.6.tgz
$ tar xvzf Python-2.6.tgz
$ cd Python-2.6
$ ./configure --enable-shared
$ sudo yum install -y zlib-devel  #zlibをincludeするために必要
$ vim Modules/Setup
#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
↓  コメントを外す485行目
zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
$ make
$ sudo make install
$ python
$ sudo cp libpython2.6.so libpython2.6.so.1.0 /usr/lib/

centOS5.7へTrac0.12を

とりあえず

導入方法はググればあるので割愛

詰まったのは

trac-admin /var/trac/プロジェクト名 initenv

これで

Database connection string [sqlite:db/trac.db]>

Creating and Initializing Project
Initenv for ‘/opt/trac’ failed.
Failed to create environment.
Cannot load Python bindings for SQLite
Traceback (most recent call last):
File “build/bdist.linux-x86_64/egg/trac/admin/console.py”, line 422,
in do_initenv
File “build/bdist.linux-x86_64/egg/trac/env.py”, line 213, in
__init__
File “build/bdist.linux-x86_64/egg/trac/env.py”, line 401, in create
File “build/bdist.linux-x86_64/egg/trac/db/api.py”, line 145, in
init_db
File “build/bdist.linux-x86_64/egg/trac/db/api.py”, line 195, in
get_connector
TracError: Cannot load Python bindings for SQLite
Initenv for ‘/opt/trac’ failed.
1
Traceback (most recent call last):
File “build/bdist.linux-x86_64/egg/trac/admin/console.py”, line 427,
in do_initenv
SystemExit: 1

がでて処理がとまる

結局 python-sqlite2を導入してなかったので導入して解決