Installing RMySQL gives an error RS-MySQL.h: 32: 19: fatal error: mysql.h: no such file

I tried to install the RMySQL library (R version 2.14.2, WinXP at 32 bits) but received the following error message:

install.packages("D:/R/library/RMySQL_0.9-3.tar.gz",repos=NULL, type="source") 

...

 RS-MySQL.h:32:19: fatal error: mysql.h: No such file or directory compilation terminated. make: *** [RS-MySQL.o] Error 1 ERROR: compilation failed for package 'RMySQL' * removing 'C:/Dokumente und Einstellungen/Giordano/R/win-library/2.14/RMySQL' Warning message: In install.packages("D:/R/library/RMySQL_0.9-3.tar.gz", repos = NULL, : installation of package 'D:/R/library/RMySQL_0.9-3.tar.gz' had non-zero exit status 

This is only part of the output containing the error message. I do not understand this message, and maybe something can give me some advice. Thanks for the help. Giordano.

+3
source share
4 answers

Some pointers to installing mysql header libraries are here:

https://github.com/jeffreyhorner/RMySQL

(now the site has now moved)

http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL

The key must have the Renviron.site file in the R \ etc folder and have libmysql.dll in the correct places before compiling from the source.

good luck.

+4
source

R cannot find the MySQL header files needed to build the package. As stated in the documentation:

You need to install "C Include Files / Lib Files" as part of your MySQL installation when installing the MySQL binary distribution.

The fix is ​​to install the MySQL header files.

+4
source

You will never get a pre-compiled binary package RMySQL for Windows, because before installing it, it checks the correct path of MySQL and other included files.

+2
source

I had the same problem. I found out that the installer placed temporary files in the default working directory, which I edited in the Rprofile.site file. When he subsequently tried to use these files (including mysql.h), he could not find them. When I restored the default Rprofile.site file, everything worked beautifully. Hope this helps if nothing did.

+1
source

Source: https://habr.com/ru/post/973990/


All Articles