mysql - Can't install RMySQL on R 3.0.2 (ubuntu 14.04) -
so far had error;
configuration error: not find mysql installation include and/or library directories. manually specify location of mysql libraries , header files , re-run r cmd install. instructions: 1. define , export 2 shell variables pkg_cppflags , pkg_libs include directory header files (*.h) , libraries, example (using bourne shell syntax): export pkg_cppflags="-i<mysql-include-dir>" export pkg_libs="-l<mysql-lib-dir> -lmysqlclient" re-run r install command: r cmd install rmysql_<version>.tar.gz 2. alternatively, may pass configure arguments --with-mysql-dir=<base-dir> (distribution directory) or --with-mysql-inc=<base-inc> (where mysql header files reside) --with-mysql-lib=<base-lib> (where mysql libraries reside) in call r install --configure-args='...' r cmd install --configure-args='--with-mysql-dir=dir' rmysql_<version>.tar.gz error: configuration failed package ‘rmysql’ * removing ‘/home/samuel/r/x86_64-pc-linux-gnu-library/3.0/rmysql’ warning in install.packages : installation of package ‘./rmysql_0.9-3.tar.gz’ had non-zero exit status
so follow says @ 1.
i input
export pkg_cppflags="-i</usr/include/mysql>" export pkg_libs="-l</usr/lib/mysql> -lmysqlclient"
and try again on terminal install command give me
r cmd install rmysql_<version>.tar.gz
and get;
checking unistd.h... yes checking mysql.h usability... no checking mysql.h presence... no checking mysql.h... no configure: creating ./config.status config.status: creating src/makevars ** libs gcc -std=gnu99 -i/usr/share/r/include -dndebug -i</usr/include/mysql> -fpic -o3 -pipe -g -c rs-dbi.c -o rs-dbi.o gcc -std=gnu99 -i/usr/share/r/include -dndebug -i</usr/include/mysql> -fpic -o3 -pipe -g -c rs-mysql.c -o rs-mysql.o in file included rs-mysql.c:22:0: rs-mysql.h:32:19: fatal error: mysql.h: no existe el archivo o el directorio #include <mysql.h> ^ compilation terminated. make: *** [rs-mysql.o] error 1 error: compilation failed package ‘rmysql’
so looking found recommendations;
installing rmysql gives error rs-mysql.h:32:19: fatal error: mysql.h: no such file
and following says here:
http://biostat.mc.vanderbilt.edu/wiki/main/rmysql
i don't step;
3. edit or create file renviron.site , add variable mysql_home contains location of mysql install. file typically isn't created when installing r, may need create yourself. want place under /etc directory in r home area. if don't know is, can issue r.home() @ r prompt. adding variable named mysql_home in variable=value syntax. here's example: location of renviron.site: c:/progra~1/r/r-2.11~1.0/etc/renviron.site content is: mysql_home=c:/progra~1/mysql/mysqls~1.0/
because, when im in renviron.site, doesn't let me edit on anything, dont have clear should put there, anyway, writte
mysql_home=c:/progra~1/mysql/mysqls~1.0/***
but cant save it, doesnt let me, because says im not allowed, , can't create new file or there in /etc/
your inputs wrong, first of rid of greater , less signs. mysql include directory run command:
$ mysql_config --include
so if it's same path provided instead of:
export pkg_cppflags="-i</usr/include/mysql>"
enter:
export pkg_cppflags="-i/usr/include/mysql"
for library path enter command:
$ mysql_config --libs
and same above enter path without signs me like:
export pkg_libs="-l/usr/lib/x86_64-linux-gnu -lmysqlclient"
finally in last input instead of "version" specify version number. these steps should fix problem. editing , writing in /etc/ directory should have permissions, if administrator can sudo command. , path provided windows not linux.
Comments
Post a Comment