[Rd] Error Compiling RMySQL in Fedora Core 5 86x64

Hin-Tak Leung hin-tak.leung at cimr.cam.ac.uk
Mon May 15 13:26:30 CEST 2006


on fedora core 5, you'll need to install the mysql-devel package.
the "mysql.h" header is in /usr/include/mysql/ .

So you need:
export PKG_CPPFLAGS="-I/usr/include/mysql"
export PKG_LIBS="-L/usr/lib64/mysql -lmysqlclient"

Juan Santiago Ramseyer wrote:
> in download and automatic install the RMySQL, R show the error (look
> under session attach. MySQL is install and operational.
> 
> Juan Santiago Ramseyer.
> 
> 
> 
>> install.packages('RMySQL')
> --- Please select a CRAN mirror for use in this session ---
> Loading Tcl/Tk interface ... done
> tentando a URL
> 'http://cran.br.r-project.org/src/contrib/RMySQL_0.5-7.tar.gz'
> Content type 'application/x-tar' length 142507 bytes
> URL aberta
> ==================================================
> downloaded 139Kb
> 
> * 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... yes
> 
> 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
> 
> ERROR: configuration failed for package 'RMySQL'
> ** Removing '/usr/lib64/R/library/RMySQL'
> 
> The downloaded packages are in
>         /tmp/RtmpLXIne5/downloaded_packages
> Warning message:
> installation of package 'RMySQL' had non-zero exit status in:
> install.packages("                        RMySQL")
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list