[R] RMySQL loading error

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed May 17 20:57:21 CEST 2006

On Wed, 17 May 2006, Patrice Seyed wrote:

> i was able to install DBI and RMySQL cleanly. I get the error below on
> "library('RMySQL')".
> The file it is complaining about is located in /usr/lib/mysql/, where is
> R trying to load it from? Tried a symlink into /usr/local/lib/mysql to
> no avail. thx. -P

You need /usr/lib/mysql in the your ld.so load path: normally this is done 
via ldconfig: for example my FC3 system has in /etc/ld.so.conf:

include ld.so.conf.d/*.conf

In short, mysql has not been installed completely.

> Loading required package: DBI
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
>        unable to load shared library
> '/usr/local/IT/R-2.1.0/library/RMySQL/libs/RMySQL.so':
>  libmysqlclient.so.10: cannot open shared object file: No such file or
> directory
> Error in library("RMySQL") : .First.lib failed for 'RMySQL'
> > q()
> # find / -name libmysqlclient.so.10
> /usr/lib/mysql/libmysqlclient.so.10

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list