[R-SIG-Mac] RMySQL installation

noel0925 at sbcglobal.net noel0925 at sbcglobal.net
Sat Oct 14 23:19:54 CEST 2006


Hi All, 

I am trying to install RMySQL, but keep encountering
problems. From the biomaRT pdf (Oct 3) it seems that
one should be able to do the install using biocLite():
But this fails.

> source("http://bioconductor.org/biocLite.R")
> biocLite("RMySQL")
Running getBioC version 0.1.8 with R version 2.4.0 
Running biocinstall version 1.9.8 with R version 2.4.0

Your version of R requires version 1.9 of
Bioconductor.
dependency '‘RMySQL’' is not available



I have also tried to follow the guidlines for manually
specifying the location of the mysql libraries and
header files since I originally got an error like the
one below when compiling from source- still this did
not fix the problem either.


http://r.research.att.com/reports/tiger-universal/results/2.4.0/html/RMySQL.report.html

ERROR: configuration failed for package 'RMySQL'
Build output
* Installing *source* package 'RMySQL' ...
creating cache ./config.cache
checking how to run the C preprocessor... cc -E
checking for compress in -lz... yes
checking for getopt_long in -lc... yes
checking for mysql_init in -lmysqlclient... no
checking for mysql.h... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for /usr/local/include/mysql/mysql.h... no
checking for /usr/include/mysql/mysql.h... no
checking for /usr/local/mysql/include/mysql/mysql.h...
no
checking for /opt/include/mysql/mysql.h... no
checking for /include/mysql/mysql.h... no

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>"
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

** Removing
'/Builds/Rdev-web/QA/Simon/packages/tiger-universal/Rlib/2.4.0/RMySQL'


I then installed updated version of MySQL 5.0.16 via
Darwin ports and tried the above again (using option 1
to export the shell variables) - still get a similar
error though.

Any tips would be great.

Thanks, 
Noelle



More information about the R-SIG-Mac mailing list