1

yumを使用してcentosVPSにMySQLdbモジュールをインストールしましたが、正常にインストールされ、エラーは発生しませんでした。しかし、Pythonサイトを閲覧すると、エラーが表示されます。「MySQLdbモジュールのロードエラー:MySQLdbという名前のモジュールがありません」。エラーの詳細については、http://74.53.127.172/を参照してください。また、zipファイルからこのモジュールをインストールしようとしましたが、次のエラーが発生します。

_mysql.c: In function â_mysql_ConnectionObject_get_proto_infoâ:
_mysql.c:1633: error: â_mysql_ConnectionObjectâ has no member named âope        nâ
_mysql.c:1634: warning: implicit declaration of function âmysql_get_prot        o_infoâ
_mysql.c:1634: error: â_mysql_ConnectionObjectâ has no member named âcon        nectionâ
_mysql.c: In function â_mysql_ConnectionObject_get_server_infoâ:
_mysql.c:1648: error: â_mysql_ConnectionObjectâ has no member named âope        nâ
_mysql.c:1649: warning: implicit declaration of function âmysql_get_serv        er_infoâ
_mysql.c:1649: error: â_mysql_ConnectionObjectâ has no member named âcon        nectionâ
_mysql.c:1649: warning: passing argument 1 of âPyString_FromStringâ make        s pointer from integer without a cast
_mysql.c: In function â_mysql_ConnectionObject_infoâ:
_mysql.c:1665: error: â_mysql_ConnectionObjectâ has no member named âope        nâ
_mysql.c:1666: warning: implicit declaration of function âmysql_infoâ
_mysql.c:1666: error: â_mysql_ConnectionObjectâ has no member named âcon        nectionâ
4

2 に答える 2

0

Python インタラクティブ シェルを生成してから、MySQLdb をインポートして、同じエラーが発生するかどうかを確認してください。この場合、モジュールは正常にインストールされませんでした。"locate mysqldb" を試して、出力を提供してください。

于 2011-06-13T14:51:33.753 に答える