[R] RMySQL install

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jan 29 22:11:47 CET 2002


On Tue, 29 Jan 2002, Michaell Taylor wrote:

> I am having some trouble getting RMySQL installed.  Thought there might be
> some ideas out there.  The problem:
>
> MySQL 3.23.47 is installed (server,devel, client, benchmarks,shared) and
> seems to be working.  R 1.4.0 is working.
>
> >On first install attempt I get :
> >
> >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.
>
> following the instructions, I:
>  export MYSQL_DIR="/usr"
> then,
> R CMD INSTALL RMySQL_0.4-3.tar.gz
>
> Seems to have solved the problem, no errors, help files built, etc.  BUT...
>
> > library(RMySQL)
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
>         unable to load shared library
> "/usr/local/lib/R/library/RMySQL/libs/RMySQL.so":
>   /usr/local/lib/R/library/RMySQL/libs/RMySQL.so: undefined symbol:
> mysql_field_count
> Error in library(RMySQL) : .First.lib failed
>
> repeated the process on a similar (but apparently not the same) box - no
> problems, didn't even have to specify the mysql home directory as a shell
> variable.
>
> Tried rebuilding R and MySQL - didn't help.  Otherwise R and MySQL seem to be
> working.
>
> Has anyone seen this problem before?  Thanks in advance.

Yes. You need to set LD_LIBRARY_PATH to include your MySQL libraries: they
are installed in strange places by default.

Try ldd on /usr/local/lib/R/library/RMySQL/libs/RMySQL.so.

What happened to giving your system information, BTW?

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list