May 15, 2021

Error Install MySQLdb Because Can't Find my_config.h

Usually issues are found because there are some dependencies that are required but not installed yet. Make sure libmysqlclient-dev is installed, also check the /usr/include/mysql directory to make sure the file my_config.h does not exist like the message on the log.

For the case I’ve found, the file my_config.h is not in the /usr/include/mysql directory and for fixing it use the following command:

$ cd /usr/include/mysql
$ sudo wget -O my_config.h