Bonjour @ tous,
J'ai installé trac sur un serveur debian. Ce serveur allant bientôt arrivé à expiration (OVH), j'ai profité de cela pour migrer vers CentOS.
J'utilse trac avec svn + mysql
Voici le fichier de conf (apache) :
bien sur les mots précédés par des dolars sont remplacées par de 'vraies' valeursNameVirtualHost $HOST:80
<VirtualHost $HOST:80>
ServerAlias $HOST
ServerName $HOST
ErrorLog /var/log/httpd/trac/error.log
CustomLog /var/log/httpd/trac/access.log common
LogLevel debug
<Location />
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracUriRoot /
PythonOption TracEnv $ENV
</Location>
</VirtualHost>
voici le fichier de conf de trac
Voici ce qu'il me dit des la page d'accueil# -*- coding: utf-8 -*-
[attachment]
max_size = 262144
render_unsafe_content = false
[browser]
color_scale = True
downloadable_paths = /trunk, /branches/*, /tags/*
hide_properties = svk:merge
intermediate_color =
intermediate_point =
newest_color = (255, 136, 136)
oldest_color = (136, 136, 255)
oneliner_properties = trac:summary
render_unsafe_content = false
wiki_properties = trac:description
[changeset]
max_diff_bytes = 10000000
max_diff_files = 0
wiki_format_messages = true
[header_logo]
alt =alternative text
height = 45
link = $HOST
src = $LOGO
width = 160
[inherit]
plugins_dir =
templates_dir =
[logging]
log_file = trac.log
log_level = ERROR
log_type = file
[milestone]
stats_provider = DefaultTicketGroupStatsProvider
[mimeviewer]
max_preview_size = 262144
mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb
pygments_default_style = trac
pygments_modes =
tab_width = 8
treat_as_binary = application/octet-stream,application/pdf,application/postscript,application/rtf
[notification]
admit_domains =
always_notify_owner = false
always_notify_reporter = false
always_notify_updater = true
email_sender = SmtpEmailSender
ignore_domains =
mime_encoding = none
sendmail_path = sendmail
smtp_always_bcc =
smtp_always_cc =
smtp_default_domain =
smtp_enabled = false
smtp_from = trac@localhost
smtp_from_name =
smtp_password =
smtp_port = 25
smtp_replyto = trac@localhost
smtp_server = localhost
smtp_subject_prefix = __default__
smtp_user =
ticket_subject_template = $prefix #$ticket.id: $summary
use_public_cc = false
use_short_addr = false
use_tls = false
[project]
admin =
admin_trac_url = .
descr = My example project
footer = Visit the Trac open source project at<br /><a href="http://trac.edgewall.org/">http://trac.edgewall.org/</a>
icon = $FAVICON
name = example
url = $URL
[query]
default_anonymous_query = status!=closed&cc~=$USER
default_query = status!=closed&owner=$USER
items_per_page = 100
ticketlink_query = ?status=!closed
[report]
items_per_page = 100
items_per_page_rss = 0
[revisionlog]
default_log_limit = 100
[roadmap]
stats_provider = DefaultTicketGroupStatsProvider
[search]
min_query_length = 3
[svn]
branches = trunk,branches/*
tags = tags/*
[ticket]
default_cc =
default_component =
default_description =
default_keywords =
default_milestone =
default_owner =
default_priority = major
default_resolution = fixed
default_severity =
default_summary =
default_type = defect
default_version =
max_comment_size = 262144
max_description_size = 262144
preserve_newlines = default
restrict_owner = false
workflow = ConfigurableTicketWorkflow
[ticket-workflow]
accept = new,assigned,accepted,reopened -> accepted
accept.operations = set_owner_to_self
accept.permissions = TICKET_MODIFY
leave = * -> *
leave.default = 1
leave.operations = leave_status
reassign = new,assigned,accepted,reopened -> assigned
reassign.operations = set_owner
reassign.permissions = TICKET_MODIFY
reopen = closed -> reopened
reopen.operations = del_resolution
reopen.permissions = TICKET_CREATE
resolve = new,assigned,accepted,reopened -> closed
resolve.operations = set_resolution
resolve.permissions = TICKET_MODIFY
[timeline]
abbreviated_messages = True
changeset_collapse_events = false
changeset_long_messages = false
changeset_show_files = 0
default_daysback = 30
max_daysback = 90
newticket_formatter = oneliner
ticket_show_details = false
[trac]
auth_cookie_lifetime = 0
auth_cookie_path =
authz_file =
authz_module_name =
auto_preview_timeout = 2.0
auto_reload = False
backup_dir = db
base_url =
check_auth_ip = false
#database = sqlite:db/trac.db
database = mysql://$USER:$MDP@$HOST/$TABLE
debug_sql = False
default_charset = utf8
genshi_cache_size = 128
htdocs_location =
ignore_auth_case = false
mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search
metanav = login,logout,prefs,help,about
mysqldump_path = mysqldump
never_obfuscate_mailto = false
permission_policies = DefaultPermissionPolicy, LegacyAttachmentPolicy
permission_store = DefaultPermissionStore
pg_dump_path = pg_dump
repository_dir = /home/svn
repository_sync_per_request = (default)
repository_type = svn
resizable_textareas = true
secure_cookies = False
show_email_addresses = false
show_ip_addresses = false
timeout = 20
use_base_url_for_redirect = False
[wiki]
ignore_missing_pages = false
max_size = 262144
render_unsafe_content = false
split_page_names = false
J'ai cherché sur le net (pendant longtemps) et je trouve rien.Cannot load Python bindings for MySQL
Est ce que certaines personnes pourrait m'aider ?
EDIT :
dans le fichier de log, j'ai
ce qui n'occure rien de bon2010-11-08 14:03:28,319 Trac[env] ERROR: Exception caught while checking for upgrade:
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/trac/env.py", line 672, in open_environment
needs_upgrade = env.needs_upgrade()
File "/usr/lib/python2.4/site-packages/trac/env.py", line 504, in needs_upgrade
db = self.get_db_cnx()
File "/usr/lib/python2.4/site-packages/trac/env.py", line 335, in get_db_cnx
return get_read_db(self)
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 90, in get_read_db
return _transaction_local.db or DatabaseManager(env).get_connection()
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 150, in get_connection
connector, args = self.get_connector()
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 195, in get_connector
raise TracError(connector.error)
TracError: Cannot load Python bindings for MySQL
2010-11-08 14:03:28,337 Trac[env] ERROR: Exception caught while checking for upgrade:
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/trac/env.py", line 672, in open_environment
needs_upgrade = env.needs_upgrade()
File "/usr/lib/python2.4/site-packages/trac/env.py", line 504, in needs_upgrade
db = self.get_db_cnx()
File "/usr/lib/python2.4/site-packages/trac/env.py", line 335, in get_db_cnx
return get_read_db(self)
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 90, in get_read_db
return _transaction_local.db or DatabaseManager(env).get_connection()
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 150, in get_connection
connector, args = self.get_connector()
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 195, in get_connector
raise TracError(connector.error)
TracError: Cannot load Python bindings for MySQL
2010-11-08 14:03:28,337 Trac[env] ERROR: Exception caught while checking for upgrade:
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/trac/env.py", line 672, in open_environment
needs_upgrade = env.needs_upgrade()
File "/usr/lib/python2.4/site-packages/trac/env.py", line 504, in needs_upgrade
db = self.get_db_cnx()
File "/usr/lib/python2.4/site-packages/trac/env.py", line 335, in get_db_cnx
return get_read_db(self)
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 90, in get_read_db
return _transaction_local.db or DatabaseManager(env).get_connection()
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 150, in get_connection
connector, args = self.get_connector()
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 195, in get_connector
raise TracError(connector.error)
TracError: Cannot load Python bindings for MySQL
2010-11-08 14:03:28,685 Trac[env] INFO: Reloading environment due to configuration change
2010-11-08 14:03:28,692 Trac[env] INFO: Reloading environment due to configuration change
2010-11-08 14:03:28,743 Trac[env] ERROR: Exception caught while checking for upgrade:
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/trac/env.py", line 672, in open_environment
needs_upgrade = env.needs_upgrade()
File "/usr/lib/python2.4/site-packages/trac/env.py", line 504, in needs_upgrade
db = self.get_db_cnx()
File "/usr/lib/python2.4/site-packages/trac/env.py", line 335, in get_db_cnx
return get_read_db(self)
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 90, in get_read_db
return _transaction_local.db or DatabaseManager(env).get_connection()
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 150, in get_connection
connector, args = self.get_connector()
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 195, in get_connector
raise TracError(connector.error)
TracError: Cannot load Python bindings for MySQL
2010-11-08 14:03:28,749 Trac[env] ERROR: Exception caught while checking for upgrade:
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/trac/env.py", line 672, in open_environment
needs_upgrade = env.needs_upgrade()
File "/usr/lib/python2.4/site-packages/trac/env.py", line 504, in needs_upgrade
db = self.get_db_cnx()
File "/usr/lib/python2.4/site-packages/trac/env.py", line 335, in get_db_cnx
return get_read_db(self)
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 90, in get_read_db
return _transaction_local.db or DatabaseManager(env).get_connection()
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 150, in get_connection
connector, args = self.get_connector()
File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 195, in get_connector
raise TracError(connector.error)
TracError: Cannot load Python bindings for MySQL
EDIT :
Etant curieux, je suis allé dans une console python pour voir si le module se chargait bien, il s'avère que bingo l'erreur vient de là
Lorsque je faisdans une console ython, la réponse est
Code : Sélectionner tout - Visualiser dans une fenêtre à part >>> import MySQLdb
>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib64/python2.4/site-packages/MySQLdb/__init__.py", line 19, in ?
import _mysql
ImportError: libmysqlclient_r.so.15: cannot open shared object file: No such file or directory
Partager