[R] RMySQL : Not loading

Geoff Grimwood geoff.grimwood at paradise.net.nz
Wed Jan 14 12:33:32 CET 2004


I'm tearing my hair out over this. Any help will be very much 
appreciated. It's been two long nights battling with RMySQL.

 > library(RMySQL)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
         unable to load shared library 
   dlcompat: dyld: /usr/local/lib/R/bin/R.bin Undefined symbols:
Error in library(RMySQL) : .First.lib failed

I am running Mac OS 10.2.8, R 1.8.1, RMySQL 0.5-3, MySQL 4.0.17. R and 
MySQL are well otherwise

I have moved away from the Fink sourced (ie /sw) version of R and MySQL 
to regular /usr/local types. Mainly because the Fink R is 1.7 and can't 
do the MySQL business. And I was wondering if the RMySQL install was 
comin to grief because it couldn't find the /sw mysql files.

Anyway, RMySQL seems to have install OK. I see it with 
installed.packages(). There was the apparent inability to find 
lmysqlclient and mysql.h but that seems to be a red herring (see below).


Geoff Grimwood
New Zealand

[SIDLAW02:~/Desktop] geoff% sudo R CMD INSTALL 
--with-mysql-lib=/usr/local/mysql/lib' RMySQL_0.5-3.tar.gz
* Installing *source* package 'RMySQL' ...
creating cache ./config.cache
checking how to run the C preprocessor... cc -E
checking for mysql_init in -lmysqlclient... no
checking for mysql.h... no
updating cache ./config.cache
creating ./config.status
creating src/Makevars
** libs
gcc -no-cpp-precomp -I/usr/local/lib/R/include 
-I/usr/local/mysql/include -I/sw/include   -fno-common  -g -O2 -c 
RS-DBI.c -o RS-DBI.o
gcc -no-cpp-precomp -I/usr/local/lib/R/include 
-I/usr/local/mysql/include -I/sw/include   -fno-common  -g -O2 -c 
RS-MySQL.c -o RS-MySQL.o
gcc -bundle -flat_namespace -undefined suppress -L/sw/lib 
-L/usr/local/lib -o RMySQL.so RS-DBI.o RS-MySQL.o 
-L/usr/local/mysql/lib -lmysqlclient -lz -lcc_dynamic 
-L/usr/local/lib/R/bin -lR

SIDLAW02:library/RMySQL/libs] geoff% ls -ltr
total 500
-rwxr-xr-x    1 root     staff      254816 Jan 14 23:45 RMySQL.so
-rwxr-xr-x    1 root     staff      249856 Jan 14 23:46 libmySQL.dll
-rw-r--r--    1 root     staff         155 Jan 14 23:46 

More information about the R-help mailing list