我正在尝试在python2环境中安装Mysqldb,并尝试了以下方法。
下面是最初的错误:
#include "my_config.h"
^~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1然后我尝试了这些
sudo apt-get install python-mysqldb
sudo apt-get install python-pip python-dev libmysqlclient-dev
sudo apt-get install libssl-dev错误中没有任何更改,然后我尝试了这个sudo apt install default-libmysqlclient-dev
现在的错误是
In file included from _mysql.c:44:
/usr/include/mariadb/my_config.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
#warning This file should not be included by clients, include only <mysql.h>
^~~~~~~
In file included from _mysql.c:46:
/usr/include/mariadb/mysql.h:444:3: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
MYSQL_CLIENT_PLUGIN_HEADER
^~~~~~~~~~~~~~~~~~~~~~~~~~
_mysql.c: In function ‘_mysql_ConnectionObject_ping’:
_mysql.c:2005:41: error: ‘MYSQL’ {aka ‘struct st_mysql’} has no member named ‘reconnect’
if ( reconnect != -1 ) self->connection.reconnect = reconnect;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1有人可以在python2 virtualenv中设置mysqldb吗?
发布于 2020-02-28 22:21:01
https://stackoverflow.com/questions/60380817
复制相似问题