I want to gem install do_mysql, it fails because the MySQL header files can not be found.
do_mysql.c:5:19: error: mysql.h: No such file or directory
do_mysql.c:6:20: error: errmsg.h: No such file or directory
do_mysql.c:7:26: error: mysqld_error.h: No such file or directory"
My system adminstrator install mysql as a package, so basically the “/usr/local/mysql” do not exist at all!!
So what should I do?
by querying the package
rpm -q --filesbypkg mysql-5.5.19-1.el6.remi.x86_64
mysql /usr/bin/msql2mysql
mysql /usr/bin/mysql
mysql /usr/bin/mysql_config
mysql /usr/bin/mysql_find_rows
mysql /usr/bin/mysql_waitpid
mysql /usr/bin/mysqlaccess
mysql /usr/bin/mysqladmin
[...]
You have to install the “developer package” of MySQL on your distribution which contains the required header files (your error message contains pointers at
mysql.h).On RHEL 6 or compatible distribution you can just install the package
mysql-devel.