Question: Connecting R environment to Mysql databases on Unix system
1
gravatar for marcelelaux
3.0 years ago by
marcelelaux20
Canada
marcelelaux20 wrote:

Hello Guys

I have a really (long time) important question here, and I will really appreciate any help

I'd like to perform several statistical tasks using R environment under unix system. Actually up to now I have used R Studio (windows), for ecology studies, but now I have huge tables of metagenomic data to analyze.

I created my Mysql database (unix) of metagenomic data, with reads and uniprot's and Knumbers and taxid's and so so so on. This means that I have dozens of tables with thousands (even millions) entries. Now I have to perform some tasks unavailable on Mysql functions, like variance analysis, PCA, cluster, regression, even stepwise model choices.

I have tried to install the RMySQL and dbConnect packages on R Studio, but I got the message:

Warning in install.packages :
  package ‘dbConnect’ is not available (for R version 3.1.0)

I searched for this error and none of the available suggestions and comments and possible solutions worked to me.

Besides of this, what would be really efficient would be do this connection between R and Mysql under command line unix system. 

My R version on unix is 

R version 3.1.0 (2014-04-10) -- "Spring Dance"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)

My MySQL version is:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1081 ----> I thing that this id will be important, right?
Server version: 5.1.73 Source distribution

I dont know what to do, I searched for this in many blogs, foruns, I asked my colleagues and advisors, no one around me could help me, for now.

You can just send to me links and any kind of material (books, tutorials), I can try to do this by myself, but I need, at least, a objective reading about this (or someone that did this).... I have dozens of R books and tutorials and none of them help to do this.

Thank You!

Merry Christmas!

dbconnect unix mysql R rmysql • 4.1k views
ADD COMMENTlink modified 3.0 years ago • written 3.0 years ago by marcelelaux20
1

"dbConnect: Provides a graphical user interface to connect with databases that use MySQL" <- do you really need this package ? RMySQL should be enough.

ADD REPLYlink written 3.0 years ago by Pierre Lindenbaum102k

Yes, sure, you are right, I tried dbConnect too because RMySQL doesn't work, but what I need is the later.

Thanx

ADD REPLYlink written 3.0 years ago by marcelelaux20
1
gravatar for Ram
3.0 years ago by
Ram12k
New York
Ram12k wrote:

Quick possible solution: Can you try running

>install.packages('RMySQL', type='source')

unless you tried that already? If you did and it did not succeed, the error you face would help get to the next step.

ADD COMMENTlink modified 3.0 years ago • written 3.0 years ago by Ram12k

I tried this command and a "+" appear, so I tried this one:

install.packages("RMySQL", lib="/my/own/R-packages/")

then selected a CRAN mirror, a lot of checks were performed and I got this configuration error:

could not find the MySQL installation include and/or library
  directories.  Manually specify the location of the MySQL
  libraries and the header files and re-run R CMD INSTALL.

INSTRUCTIONS:

1. Define and export the 2 shell variables PKG_CPPFLAGS and
   PKG_LIBS to include the directory for header files (*.h)
   and libraries, for example (using Bourne shell syntax):

      export PKG_CPPFLAGS="-I<MySQL-include-dir>" ----> How I get this information of MySQL directory?
      export PKG_LIBS="-L<MySQL-lib-dir> -lmysqlclient"

   Re-run the R INSTALL command:

      R CMD INSTALL RMySQL_<version>.tar.gz

2. Alternatively, you may pass the 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 the call to R INSTALL --configure-args='...'
   R CMD INSTALL --configure-args='--with-mysql-dir=DIR' RMySQL_<version>.tar.gz
ERROR: configuration failed for package ‘RMySQL’
* removing ‘/root/R/x86_64-redhat-linux-gnu-library/3.1/RMySQL’

The downloaded source packages are in
        ‘/tmp/RtmpnPMTpK/downloaded_packages’
Warning message:
In install.packages("RMySQL", lib = "/my/own/R-packages/") :
  installation of package ‘RMySQL’ had non-zero exit status

PS: I have root access.

Thanx for help

ADD REPLYlink modified 3.0 years ago by Ram12k • written 3.0 years ago by marcelelaux20

Sorry, there was a mistake in matching quotes. I've updated the command, please try it again.

ADD REPLYlink written 3.0 years ago by Ram12k

 

Yes, now install.packages('RMySQL', type='source') command worked, but with the same error :(

I think that I really need to this this:

could not find the MySQL installation include and/or library
  directories.  Manually specify the location of the MySQL
  libraries and the header files and re-run R CMD INSTALL.

But I dont know how to locate this information...

Thanx

ADD REPLYlink written 3.0 years ago by marcelelaux20

OK, so after this, you ran a which mysql to which you got the output /usr/bin/mysql

From the link here( http://dev.mysql.com/doc/refman/5.0/en/installation-layouts.html ), your MYSQL INC and LIB directories are:
INC: /usr/include/mysql
LIB: /usr/lib/mysql

Now try running these on the Unix shell:

R CMD INSTALL --configure-args='--with-mysql-inc=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql' RMySQL_0.9-3.tar.gz

 

ADD REPLYlink modified 3.0 years ago • written 3.0 years ago by Ram12k

I got this:

[root@Frevo marlaux]# R CMD INSTALL --configure-args='--with-mysql-inc=<base-inc> --with-mysql-lib=<base-lib>' RMySQL_0.9-3.tar.gz
installing to library ‘/root/R/x86_64-redhat-linux-gnu-library/3.1’  installing source package ‘RMySQL’ ... * package ‘RMySQL’ successfully unpacked and MD5 sums checked sh: -c: line 0: syntax error near unexpected token newline' sh: -c: line 0:R_SHLIB_BUILD_OBJECTS_SYMBOL_TABLES=false ./configure --with-mysql-inc=<base-inc> --with-mysql-lib=<base-lib>' ERROR: configuration failed for package ‘RMySQL’ removing ‘/root/R/x86_64-redhat-linux-gnu-library/3.1/RMySQL’
ADD REPLYlink modified 3.0 years ago by Ram12k • written 3.0 years ago by marcelelaux20

I forgot to update the command with the actual directories. Please try the refreshed command now.

ADD REPLYlink written 3.0 years ago by Ram12k

no way :(

R CMD INSTALL --configure-args='--with-mysql-inc=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql' RMySQL_0.9-3.tar.gz installing to library ‘/root/R/x86_64-redhat-linux-gnu-library/3.1’ installing source package ‘RMySQL’ ... package ‘RMySQL’ successfully unpacked and MD5 sums checked checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for compress in -lz... yes checking for getopt_long in -lc... yes checking for mysql_init in -lmysqlclient... no checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking mysql.h usability... no checking mysql.h presence... no checking for mysql.h... no configure: creating ./config.status config.status: creating src/Makevars libs gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/include/mysql -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c RS-DBI.c -o RS-DBI.o gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/include/mysql -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c RS-MySQL.c -o RS-MySQL.o In file included from RS-MySQL.c:22: RS-MySQL.h:32:19: error: mysql.h: No such file or directory RS-MySQL.h:33:27: error: mysql_version.h: No such file or directory RS-MySQL.h:34:23: error: mysql_com.h: No such file or directory In file included from RS-MySQL.c:22: RS-MySQL.h:119: error: ‘FIELD_TYPE_DECIMAL’ undeclared here (not in a function) RS-MySQL.h:120: error: ‘FIELD_TYPE_TINY’ undeclared here (not in a function) RS-MySQL.h:121: error: ‘FIELD_TYPE_SHORT’ undeclared here (not in a function) RS-MySQL.h:122: error: ‘FIELD_TYPE_LONG’ undeclared here (not in a function) RS-MySQL.h:123: error: ‘FIELD_TYPE_FLOAT’ undeclared here (not in a function) RS-MySQL.h:124: error: ‘FIELD_TYPE_DOUBLE’ undeclared here (not in a function) RS-MySQL.h:125: error: ‘FIELD_TYPE_NULL’ undeclared here (not in a function) RS-MySQL.h:126: error: ‘FIELD_TYPE_TIMESTAMP’ undeclared here (not in a function) RS-MySQL.h:127: error: ‘FIELD_TYPE_LONGLONG’ undeclared here (not in a function) RS-MySQL.h:128: error: ‘FIELD_TYPE_INT24’ undeclared here (not in a function) RS-MySQL.h:129: error: ‘FIELD_TYPE_DATE’ undeclared here (not in a function) RS-MySQL.h:130: error: ‘FIELD_TYPE_TIME’ undeclared here (not in a function) RS-MySQL.h:131: error: ‘FIELD_TYPE_DATETIME’ undeclared here (not in a function) RS-MySQL.h:132: error: ‘FIELD_TYPE_YEAR’ undeclared here (not in a function) RS-MySQL.h:133: error: ‘FIELD_TYPE_NEWDATE’ undeclared here (not in a function) RS-MySQL.h:134: error: ‘FIELD_TYPE_ENUM’ undeclared here (not in a function) RS-MySQL.h:135: error: ‘FIELD_TYPE_SET’ undeclared here (not in a function) RS-MySQL.h:136: error: ‘FIELD_TYPE_TINY_BLOB’ undeclared here (not in a function) RS-MySQL.h:137: error: ‘FIELD_TYPE_MEDIUM_BLOB’ undeclared here (not in a function) RS-MySQL.h:138: error: ‘FIELD_TYPE_LONG_BLOB’ undeclared here (not in a function) RS-MySQL.h:139: error: ‘FIELD_TYPE_BLOB’ undeclared here (not in a function) RS-MySQL.h:140: error: ‘FIELD_TYPE_VAR_STRING’ undeclared here (not in a function) RS-MySQL.h:141: error: ‘FIELD_TYPE_STRING’ undeclared here (not in a function) RS-MySQL.c: In function ‘RS_MySQL_moreResultSets’: RS-MySQL.c:110: error: ‘MYSQL’ undeclared (first use in this function) RS-MySQL.c:110: error: (Each undeclared identifier is reported only once RS-MySQL.c:110: error: for each function it appears in.) RS-MySQL.c:110: error: ‘my_connection’ undeclared (first use in this function) RS-MySQL.c:110: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:110: warning: statement with no effect RS-MySQL.c:111: error: ‘my_bool’ undeclared (first use in this function) RS-MySQL.c:111: warning: statement with no effect RS-MySQL.c:111: error: expected ‘;’ before ‘tmp’ RS-MySQL.c:115: error: expected expression before ‘)’ token RS-MySQL.c:115: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:115: warning: statement with no effect RS-MySQL.c:117: error: ‘tmp’ undeclared (first use in this function) RS-MySQL.c:117: warning: implicit declaration of function ‘mysql_more_results’ RS-MySQL.c:117: warning: statement with no effect RS-MySQL.c: In function ‘RS_MySQL_nextResultSet’: RS-MySQL.c:137: error: ‘MYSQL_RES’ undeclared (first use in this function) RS-MySQL.c:137: error: ‘my_result’ undeclared (first use in this function) RS-MySQL.c:137: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:137: warning: statement with no effect RS-MySQL.c:138: error: ‘MYSQL’ undeclared (first use in this function) RS-MySQL.c:138: error: ‘my_connection’ undeclared (first use in this function) RS-MySQL.c:138: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:138: warning: statement with no effect RS-MySQL.c:142: error: expected expression before ‘)’ token RS-MySQL.c:142: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:142: warning: statement with no effect RS-MySQL.c:144: warning: implicit declaration of function ‘mysql_next_result’ RS-MySQL.c:154: warning: implicit declaration of function ‘mysql_use_result’ RS-MySQL.c:154: warning: statement with no effect RS-MySQL.c:156: error: expected expression before ‘)’ token RS-MySQL.c:156: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:156: error: called object ‘<erroneous-expression>’ is not a function RS-MySQL.c:156: warning: statement with no effect RS-MySQL.c:158: warning: implicit declaration of function ‘mysql_field_count’ RS-MySQL.c:176: warning: implicit declaration of function ‘mysql_affected_rows’ RS-MySQL.c: In function ‘RS_MySQL_createConnection’: RS-MySQL.c:313: error: ‘MYSQL’ undeclared (first use in this function) RS-MySQL.c:313: error: ‘my_connection’ undeclared (first use in this function) RS-MySQL.c:313: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:313: warning: statement with no effect RS-MySQL.c:319: warning: implicit declaration of function ‘mysql_init’ RS-MySQL.c:319: warning: statement with no effect RS-MySQL.c:341: warning: implicit declaration of function ‘mysql_options’ RS-MySQL.c:341: error: ‘MYSQL_READ_DEFAULT_GROUP’ undeclared (first use in this function) RS-MySQL.c:347: error: ‘MYSQL_READ_DEFAULT_FILE’ undeclared (first use in this function) RS-MySQL.c:349: warning: implicit declaration of function ‘mysql_real_connect’ RS-MySQL.c:356: warning: implicit declaration of function ‘mysql_error’ RS-MySQL.c:356: warning: format ‘%s’ expects type ‘char ’, but argument 3 has type ‘int’ RS-MySQL.c:365: warning: implicit declaration of function ‘mysql_close’ RS-MySQL.c: In function ‘RS_MySQL_closeConnection’: RS-MySQL.c:384: error: ‘MYSQL’ undeclared (first use in this function) RS-MySQL.c:384: error: ‘my_connection’ undeclared (first use in this function) RS-MySQL.c:384: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:384: warning: statement with no effect RS-MySQL.c:400: error: expected expression before ‘)’ token RS-MySQL.c:400: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:400: warning: statement with no effect RS-MySQL.c: In function ‘RS_MySQL_exec’: RS-MySQL.c:425: error: ‘MYSQL’ undeclared (first use in this function) RS-MySQL.c:425: error: ‘my_connection’ undeclared (first use in this function) RS-MySQL.c:425: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:425: warning: statement with no effect RS-MySQL.c:426: error: ‘MYSQL_RES’ undeclared (first use in this function) RS-MySQL.c:426: error: ‘my_result’ undeclared (first use in this function) RS-MySQL.c:426: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:426: warning: statement with no effect RS-MySQL.c:432: error: expected expression before ‘)’ token RS-MySQL.c:432: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:432: warning: statement with no effect RS-MySQL.c:454: warning: implicit declaration of function ‘mysql_query’ RS-MySQL.c:459: warning: format ‘%s’ expects type ‘char ’, but argument 3 has type ‘int’ RS-MySQL.c:470: warning: statement with no effect RS-MySQL.c:472: error: expected expression before ‘)’ token RS-MySQL.c:472: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:472: error: called object ‘<erroneous-expression>’ is not a function RS-MySQL.c:472: warning: statement with no effect RS-MySQL.c: In function ‘RS_MySQL_createDataMappings’: RS-MySQL.c:511: error: ‘MYSQL_RES’ undeclared (first use in this function) RS-MySQL.c:511: error: ‘my_result’ undeclared (first use in this function) RS-MySQL.c:511: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:511: warning: statement with no effect RS-MySQL.c:512: error: ‘MYSQL_FIELD’ undeclared (first use in this function) RS-MySQL.c:512: error: ‘select_dp’ undeclared (first use in this function) RS-MySQL.c:512: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:512: warning: statement with no effect RS-MySQL.c:520: error: expected expression before ‘)’ token RS-MySQL.c:520: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:520: warning: statement with no effect RS-MySQL.c:523: warning: implicit declaration of function ‘mysql_fetch_fields’ RS-MySQL.c:523: warning: statement with no effect RS-MySQL.c:526: error: ‘MYSQL’ undeclared (first use in this function) RS-MySQL.c:526: error: expected expression before ‘)’ token RS-MySQL.c:526: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:552: error: ‘struct data_types’ has no member named ‘name’ RS-MySQL.c:552: warning: passing argument 1 of ‘RS_DBI_copyString’ from incompatible pointer type RS-DBI.h:237: note: expected ‘const char ’ but argument is of type ‘struct data_types ’ RS-MySQL.c:553: error: ‘struct data_types’ has no member named ‘type’ RS-MySQL.c:553: warning: assignment makes integer from pointer without a cast RS-MySQL.c:554: error: ‘struct data_types’ has no member named ‘length’ RS-MySQL.c:554: warning: assignment makes integer from pointer without a cast RS-MySQL.c:555: error: ‘struct data_types’ has no member named ‘length’ RS-MySQL.c:555: warning: assignment makes integer from pointer without a cast RS-MySQL.c:556: error: ‘struct data_types’ has no member named ‘decimals’ RS-MySQL.c:556: warning: assignment makes integer from pointer without a cast RS-MySQL.c:557: warning: implicit declaration of function ‘IS_NOT_NULL’ RS-MySQL.c:557: error: ‘struct data_types’ has no member named ‘flags’ RS-MySQL.c:559: error: ‘struct data_types’ has no member named ‘type’ RS-MySQL.c:559: warning: assignment makes integer from pointer without a cast RS-MySQL.c:571: error: ‘struct data_types’ has no member named ‘flags’ RS-MySQL.c:571: error: ‘UNSIGNED_FLAG’ undeclared (first use in this function) RS-MySQL.c:571: error: invalid operands to binary & (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c: In function ‘RS_MySQL_fetch’: RS-MySQL.c:649: error: ‘MYSQL_RES’ undeclared (first use in this function) RS-MySQL.c:649: error: ‘my_result’ undeclared (first use in this function) RS-MySQL.c:649: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:649: warning: statement with no effect RS-MySQL.c:650: error: ‘MYSQL_ROW’ undeclared (first use in this function) RS-MySQL.c:650: warning: statement with no effect RS-MySQL.c:650: error: expected ‘;’ before ‘row’ RS-MySQL.c:687: error: expected expression before ‘)’ token RS-MySQL.c:687: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:687: warning: statement with no effect RS-MySQL.c:708: error: ‘row’ undeclared (first use in this function) RS-MySQL.c:708: warning: implicit declaration of function ‘mysql_fetch_row’ RS-MySQL.c:708: warning: statement with no effect RS-MySQL.c:713: warning: implicit declaration of function ‘mysql_errno’ RS-MySQL.c:713: error: ‘MYSQL’ undeclared (first use in this function) RS-MySQL.c:713: error: expected expression before ‘)’ token RS-MySQL.c:713: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:717: warning: implicit declaration of function ‘mysql_fetch_lengths’ RS-MySQL.c:717: warning: assignment makes pointer from integer without a cast RS-MySQL.c:721: error: invalid operands to binary == (have ‘struct data_types’ and ‘void ’) RS-MySQL.c:721: warning: assignment makes integer from pointer without a cast RS-MySQL.c:729: error: incompatible type for argument 1 of ‘atol’ /usr/include/stdlib.h:289: note: expected ‘const char ’ but argument is of type ‘struct data_types’ RS-MySQL.c:729: warning: cast from pointer to integer of different size RS-MySQL.c:745: error: incompatible type for argument 1 of ‘strlen’ /usr/include/string.h:399: note: expected ‘const char ’ but argument is of type ‘struct data_types’ RS-MySQL.c:745: warning: comparison between pointer and integer RS-MySQL.c:752: error: incompatible type for argument 1 of ‘Rf_mkChar’ /usr/include/R/Rinternals.h:777: note: expected ‘const char ’ but argument is of type ‘struct data_types’ RS-MySQL.c:752: warning: passing argument 3 of ‘SET_STRING_ELT’ from incompatible pointer type /usr/include/R/Rinternals.h:530: note: expected ‘SEXP’ but argument is of type ‘struct data_types ’ RS-MySQL.c:760: error: incompatible type for argument 1 of ‘atof’ /usr/include/stdlib.h:279: note: expected ‘const char ’ but argument is of type ‘struct data_types’ RS-MySQL.c:760: error: pointer value used where a floating point value was expected RS-MySQL.c:793: error: incompatible type for argument 1 of ‘Rf_mkChar’ /usr/include/R/Rinternals.h:777: note: expected ‘const char ’ but argument is of type ‘struct data_types’ RS-MySQL.c:793: warning: passing argument 3 of ‘SET_STRING_ELT’ from incompatible pointer type /usr/include/R/Rinternals.h:530: note: expected ‘SEXP’ but argument is of type ‘struct data_types ’ RS-MySQL.c: In function ‘RS_MySQL_getException’: RS-MySQL.c:829: error: ‘MYSQL’ undeclared (first use in this function) RS-MySQL.c:829: error: ‘my_connection’ undeclared (first use in this function) RS-MySQL.c:829: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:829: warning: statement with no effect RS-MySQL.c:849: error: expected expression before ‘)’ token RS-MySQL.c:849: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:849: warning: statement with no effect RS-MySQL.c:851: warning: passing argument 1 of ‘Rf_mkChar’ makes pointer from integer without a cast /usr/include/R/Rinternals.h:777: note: expected ‘const char ’ but argument is of type ‘int’ RS-MySQL.c: In function ‘RS_MySQL_closeResultSet’: RS-MySQL.c:862: error: ‘MYSQL_RES’ undeclared (first use in this function) RS-MySQL.c:862: error: ‘my_result’ undeclared (first use in this function) RS-MySQL.c:862: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:862: warning: statement with no effect RS-MySQL.c:867: error: expected expression before ‘)’ token RS-MySQL.c:867: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:867: warning: statement with no effect RS-MySQL.c:870: error: ‘MYSQL_ROW’ undeclared (first use in this function) RS-MySQL.c:870: warning: statement with no effect RS-MySQL.c:870: error: expected ‘;’ before ‘row’ RS-MySQL.c:871: error: ‘row’ undeclared (first use in this function) RS-MySQL.c:874: warning: implicit declaration of function ‘mysql_free_result’ RS-MySQL.c: In function ‘RS_MySQL_managerInfo’: RS-MySQL.c:941: warning: implicit declaration of function ‘mysql_get_client_info’ RS-MySQL.c:941: warning: passing argument 1 of ‘Rf_mkChar’ makes pointer from integer without a cast /usr/include/R/Rinternals.h:777: note: expected ‘const char ’ but argument is of type ‘int’ RS-MySQL.c: In function ‘RS_MySQL_connectionInfo’: RS-MySQL.c:951: error: ‘MYSQL’ undeclared (first use in this function) RS-MySQL.c:951: error: ‘my_con’ undeclared (first use in this function) RS-MySQL.c:951: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:951: warning: statement with no effect RS-MySQL.c:967: error: expected expression before ‘)’ token RS-MySQL.c:967: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:967: warning: statement with no effect RS-MySQL.c:980: error: ‘struct data_types’ has no member named ‘host’ RS-MySQL.c:980: error: ‘struct data_types’ has no member named ‘host’ RS-MySQL.c:980: warning: pointer type mismatch in conditional expression RS-MySQL.c:982: error: ‘struct data_types’ has no member named ‘user’ RS-MySQL.c:982: error: ‘struct data_types’ has no member named ‘user’ RS-MySQL.c:982: warning: pointer type mismatch in conditional expression RS-MySQL.c:984: error: ‘struct data_types’ has no member named ‘db’ RS-MySQL.c:984: error: ‘struct data_types’ has no member named ‘db’ RS-MySQL.c:984: warning: pointer type mismatch in conditional expression RS-MySQL.c:986: warning: implicit declaration of function ‘mysql_get_host_info’ RS-MySQL.c:986: warning: passing argument 1 of ‘Rf_mkChar’ makes pointer from integer without a cast /usr/include/R/Rinternals.h:777: note: expected ‘const char ’ but argument is of type ‘int’ RS-MySQL.c:987: warning: implicit declaration of function ‘mysql_get_server_info’ RS-MySQL.c:987: warning: passing argument 1 of ‘Rf_mkChar’ makes pointer from integer without a cast /usr/include/R/Rinternals.h:777: note: expected ‘const char ’ but argument is of type ‘int’ RS-MySQL.c:989: warning: implicit declaration of function ‘mysql_get_proto_info’ RS-MySQL.c:990: warning: implicit declaration of function ‘mysql_thread_id’ RS-MySQL.c: In function ‘RS_MySQL_dbApply’: RS-MySQL.c:1210: error: ‘MYSQL_RES’ undeclared (first use in this function) RS-MySQL.c:1210: error: ‘my_result’ undeclared (first use in this function) RS-MySQL.c:1210: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:1210: warning: statement with no effect RS-MySQL.c:1211: error: ‘MYSQL_ROW’ undeclared (first use in this function) RS-MySQL.c:1211: warning: statement with no effect RS-MySQL.c:1211: error: expected ‘;’ before ‘row’ RS-MySQL.c:1236: error: ‘row’ undeclared (first use in this function) RS-MySQL.c:1236: warning: statement with no effect RS-MySQL.c:1286: error: expected expression before ‘)’ token RS-MySQL.c:1286: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:1286: warning: statement with no effect RS-MySQL.c:1305: warning: statement with no effect RS-MySQL.c:1311: error: ‘MYSQL’ undeclared (first use in this function) RS-MySQL.c:1311: error: expected expression before ‘)’ token RS-MySQL.c:1311: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:1317: warning: assignment makes pointer from integer without a cast RS-MySQL.c:1326: error: invalid operands to binary == (have ‘struct data_types’ and ‘void ’) RS-MySQL.c:1326: warning: assignment makes integer from pointer without a cast RS-MySQL.c:1334: error: incompatible type for argument 1 of ‘atol’ /usr/include/stdlib.h:289: note: expected ‘const char ’ but argument is of type ‘struct data_types’ RS-MySQL.c:1334: warning: assignment makes integer from pointer without a cast RS-MySQL.c:1351: error: incompatible type for argument 1 of ‘strlen’ /usr/include/string.h:399: note: expected ‘const char ’ but argument is of type ‘struct data_types’ RS-MySQL.c:1351: warning: comparison between pointer and integer RS-MySQL.c:1358: error: incompatible type for argument 1 of ‘Rf_mkChar’ /usr/include/R/Rinternals.h:777: note: expected ‘const char ’ but argument is of type ‘struct data_types’ RS-MySQL.c:1358: warning: passing argument 3 of ‘SET_STRING_ELT’ from incompatible pointer type /usr/include/R/Rinternals.h:530: note: expected ‘SEXP’ but argument is of type ‘struct data_types ’ RS-MySQL.c:1367: error: incompatible type for argument 1 of ‘atof’ /usr/include/stdlib.h:279: note: expected ‘const char ’ but argument is of type ‘struct data_types’ RS-MySQL.c:1367: error: pointer value used where a floating point value was expected RS-MySQL.c:1402: error: incompatible type for argument 1 of ‘Rf_mkChar’ /usr/include/R/Rinternals.h:777: note: expected ‘const char ’ but argument is of type ‘struct data_types’ RS-MySQL.c:1402: warning: passing argument 3 of ‘SET_STRING_ELT’ from incompatible pointer type /usr/include/R/Rinternals.h:530: note: expected ‘SEXP’ but argument is of type ‘struct data_types ’ RS-MySQL.c: In function ‘RS_MySQL_insertid’: RS-MySQL.c:1605: error: ‘MYSQL’ undeclared (first use in this function) RS-MySQL.c:1605: error: ‘my_con’ undeclared (first use in this function) RS-MySQL.c:1605: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:1605: warning: statement with no effect RS-MySQL.c:1613: error: expected expression before ‘)’ token RS-MySQL.c:1613: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:1613: warning: statement with no effect RS-MySQL.c:1622: warning: implicit declaration of function ‘mysql_insert_id’ RS-MySQL.c: In function ‘RS_MySQL_escapeStrings’: RS-MySQL.c:1640: error: ‘MYSQL’ undeclared (first use in this function) RS-MySQL.c:1640: error: ‘my_connection’ undeclared (first use in this function) RS-MySQL.c:1640: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:1640: warning: statement with no effect RS-MySQL.c:1648: error: expected expression before ‘)’ token RS-MySQL.c:1648: error: invalid operands to binary * (have ‘struct data_types ’ and ‘struct data_types ’) RS-MySQL.c:1648: warning: statement with no effect RS-MySQL.c:1672: warning: implicit declaration of function ‘mysql_real_escape_string’ RS-MySQL.c: In function ‘RS_MySQL_clientLibraryVersions’: RS-MySQL.c:1687: error: ‘MYSQL_SERVER_VERSION’ undeclared (first use in this function) RS-MySQL.c:1687: warning: passing argument 1 of ‘Rf_mkChar’ from incompatible pointer type /usr/include/R/Rinternals.h:777: note: expected ‘const char ’ but argument is of type ‘struct data_types ’ RS-MySQL.c:1688: warning: passing argument 1 of ‘Rf_mkChar’ makes pointer from integer without a cast /usr/include/R/Rinternals.h:777: note: expected ‘const char ’ but argument is of type ‘int’ RS-MySQL.c:1690: error: ‘MYSQL_VERSION_ID’ undeclared (first use in this function) RS-MySQL.c:1690: warning: cast from pointer to integer of different size RS-MySQL.c:1691: warning: implicit declaration of function ‘mysql_get_client_version’ RS-MySQL.c: In function ‘R_init_RMySQL’: RS-MySQL.c:1698: error: ‘MYSQL_VERSION_ID’ undeclared (first use in this function) RS-MySQL.c:1698: warning: initialization makes integer from pointer without a cast RS-MySQL.c:1701: warning: implicit declaration of function ‘mysql_library_init’ RS-MySQL.c:1711: error: ‘MYSQL_SERVER_VERSION’ undeclared (first use in this function) RS-MySQL.c: In function ‘R_unload_RMySQL’: RS-MySQL.c:1716: warning: implicit declaration of function ‘mysql_library_end’ make: * [RS-MySQL.o] Error 1 ERROR: compilation failed for package ‘RMySQL’ removing ‘/root/R/x86_64-redhat-linux-gnu-library/3.1/RMySQL’

ADD REPLYlink written 3.0 years ago by marcelelaux20

Can you try installing without logging in as root? And you could probably use pastebin or GitHub Gist to share long output/error messages the next time!

ADD REPLYlink written 3.0 years ago by Ram12k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 952 users visited in the last hour