1
votes

I have already seen this RMySQL installing error on Fedora 28, Rstudio version 1.1.4, Question and answer but I do not have that issue.

I am installing MySQL using

R CMD INSTALL /home/Trina/Downloads/RMySQL_0.10.14.tar.gz

and I am getting:

  • installing to library ‘/home/Trina/R/x86_64-redhat-linux-gnu-library/3.5’
    • installing source package ‘RMySQL’ ... ** package ‘RMySQL’ successfully unpacked and MD5 sums checked Found mysql_config cflags and libs! Using PKG_CFLAGS=-I/usr/include/mysql -m64 Using PKG_LIBS=-L/usr/lib64/mysql -lmysqlclient -lpthread -lm -lrt -lssl -lcrypto -ldl ** libs rm -f RMySQL.so RMySQL-init.o connection.o db-apply.o driver.o exception.o fields.o result.o utils.o gcc -m64 -I"/usr/include/R" -DNDEBUG -I/usr/include/mysql -m64 -I/usr/local/include -fpic -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c RMySQL-init.c -o RMySQL-init.o gcc -m64 -I"/usr/include/R" -DNDEBUG -I/usr/include/mysql -m64 -I/usr/local/include -fpic -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c connection.c -o connection.o connection.c: In function ‘RS_MySQL_moreResultSets’: connection.c:224:3: error: unknown type name ‘my_bool’; did you mean ‘bool’? my_bool tmp; ^~~~~~~ bool make: *** [/usr/lib64/R/etc/Makeconf:159: connection.o] Error 1 ERROR: compilation failed for package ‘RMySQL’
    • removing ‘/home/Trina/R/x86_64-redhat-linux-gnu-library/3.5/RMySQL’

I am facing the same problem using install.packages in Rstudio. Thanks for any help from the community.

1
My guess is that you're missing a dependency. Have you tried searching for e.g. "rmysql fedora r"?Roman Luštrik
On Debian, the approach that works with many problematic packages is to install them not within R but as a Debian package (with apt-get install). Obviously, this can work only if such a Debian package exists. The difficulty may be that the installation needs some external tools e.g compilers, and R can't easily find them. Another potential source of difficulty is your mysql installation e.g the 32 vs 64 bit architecture which must match your r installationlebatsnok
I'm getting the same error on Ubuntu 18 as well. Can't seem to find any solutions.Dave Kincaid

1 Answers

0
votes

This error is something related to mysql >= 8.0 installed in the linux.

As per below mysql website, from MySQL 8.0 onwards my_bool type replaced to bool or int C type.

(Use Ctl+F in below URL and search for my_bool keyword to go straight into the update)

https://dev.mysql.com/doc/refman/8.0/en/c-api-data-structures.html

Workaround to resolve the issue

Unzip the RMySQL tar file and look for connection.c file under src folder.

In the connection.c file, just replace my_bool to bool type. After that, tar the RMySQL folder that has modified connection.c file and use this updated RMySQL tar file for installation using R CMD INSTALL.

Please try the above approach and let me know if it solves the issue.