这是我的第一个金字塔应用程序,我尝试了我能找到的任何解决方案,但没有一个对我有用。我不断收到内部服务器错误,错误日志显示:
Tue Jul 31 02:02:23 2012] [error] [client 127.0.0.1] import MySQLdb as mysql
[Tue Jul 31 02:02:23 2012] [error] [client 127.0.0.1] File "build/bdist.macosx-10.7- intel/egg/MySQLdb/__init__.py", line 19, in <module>
[Tue Jul 31 02:02:23 2012] [error] [client 127.0.0.1] File "build/bdist.macosx-10.7-intel/egg/_mysql.py", line 7, in <module>
[Tue Jul 31 02:02:23 2012] [error] [client 127.0.0.1] File "build/bdist.macosx-10.7-intel/egg/_mysql.py", line 6, in __bootstrap__
[Tue Jul 31 02:02:23 2012] [error] [client 127.0.0.1] ImportError: dlopen(/Users/anupamtulsyan/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib
[Tue Jul 31 02:02:23 2012] [error] [client 127.0.0.1] Referenced from: /Users/anupamtulsyan/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so
[Tue Jul 31 02:02:23 2012] [error] [client 127.0.0.1] Reason: image not found
[Tue Jul 31 02:02:24 2012] [error] [client 127.0.0.1] File does not exist: /opt/local/apache2/htdocs/favicon.ico
我的mysql和python都是64位安装的。文件 'libmysqlclient.18.dylib' 存在于 /usr/local/mysql/lib 中。我可以在使用以下应用程序服务时导入 MySQLdb:../bin/pserver development.ini 但是当通过 mod_wsgi 运行时,上述错误不断出现。请有人帮忙!自2天以来,我一直坚持这一点。