Question: How to install a bioconductor package RMySQL and specify R parameters
1
gravatar for moushengxu
12 months ago by
moushengxu350
moushengxu350 wrote:

I am trying to install CopywriteR, which failed at updating a dependent package RMySQL. The error I got was as follows:

------------------------- ANTICONF ERROR ---------------------------

Configuration failed because libmysqlclient was not found. Try installing:

 * deb: libmariadb-client-lgpl-dev (Debian, Ubuntu 16.04)

        libmariadbclient-dev (Ubuntu 14.04)

 * rpm: mariadb-devel | mysql-devel (Fedora, CentOS, RHEL)

 * csw: mysql56_dev (Solaris)

 * brew: mariadb-connector-c (OSX)

If libmysqlclient is already installed, check that 'pkg-config' is in your

PATH and PKG_CONFIG_PATH contains a libmysqlclient.pc file. If pkg-config

is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:

R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'

--------------------------------------------------------------------

My question is: where can I specify --configure-vars='INCLUDE_DIR=... LIB_DIR=...'? I cannot do this at command line because RMySQL is installed through bioconductor. If I do

R CMD INSTALL --configure-vars='INCLUDE_DIR=/mydir/mariadb-connector-c' RMySQL

I will get:

--------------------------------------------------------

Warning: invalid package ‘RMySQL’

Error: ERROR: no packages specified

--------------------------------------------------------

Thanks in advance!

ADD COMMENTlink modified 12 months ago • written 12 months ago by moushengxu350

If you are using R CMD INSTALL --configure-vars='INCLUDE_DIR=/mydir/mariadb-connector-c' RMySQL*.tar.gz then you'd need to download relevant version of RMySQL from https://cran.r-project.org/web/packages/RMySQL/index.html

ADD REPLYlink written 12 months ago by Sej Modha3.8k

Thanks a lot for the input. I got almost identical errors after downloading the package. Weird because "mariadb-connector-c" is already installed by brew in the specified dir and the location is given at the command line. How come it still cannot find it?

The command line:

R CMD INSTALL --configure-vars='INCLUDE_DIR=/mydir/.linuxbrew/opt/mariadb-connector-c LIB_DIR=/ark/home/mx010/.linuxbrew/opt/mariadb-connector-c' RMySQL_0.10.13.tar.gz

The errors:

* installing to library ‘/ark/home/mx010/R/x86_64-pc-linux-gnu-library/3.2’
* installing *source* package ‘RMySQL’ ...
** package ‘RMySQL’ successfully unpacked and MD5 sums checked
Found INCLUDE_DIR and/or LIB_DIR!
Using PKG_CFLAGS=-I/ark/home/mx010/.linuxbrew/opt/mariadb-connector-c 
Using PKG_LIBS=-L/ark/home/mx010/.linuxbrew/opt/mariadb-connector-c -lmysqlclient
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libmysqlclient was not found. Try installing:
 * deb: libmariadb-client-lgpl-dev (Debian, Ubuntu 16.04)
        libmariadbclient-dev (Ubuntu 14.04)
 * rpm: mariadb-devel | mysql-devel (Fedora, CentOS, RHEL)
 * csw: mysql56_dev (Solaris)
 * brew: mariadb-connector-c (OSX)
If libmysqlclient is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libmysqlclient.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘RMySQL’
* removing ‘/ark/home/mx010/R/x86_64-pc-linux-gnu-library/3.2/RMySQL’
ADD REPLYlink written 12 months ago by moushengxu350

I am sorry but I won't be able to help any further as I don't have those specific tools installed on my system, I found this stackoverflow thread that might help: https://stackoverflow.com/questions/41947213/trouble-installing-rmysql-on-osx-sierra

ADD REPLYlink written 12 months ago by Sej Modha3.8k
1
gravatar for moushengxu
12 months ago by
moushengxu350
moushengxu350 wrote:

I was able to install CopywriteR after the following steps:

  1. Download CopyhelpeR_1.0.2.tar.gz

  2. sudo R CMD INSTALL CopyhelpeR*.tar.gz

  3. sudo R CMD INSTALL CopywriteR*.tar.gz

This somehow bypassed the RMySQL installation. Part of the problem might come from the R version: I was using R 3.2.3, while CopywriteR was built under R version 3.4.2.

ADD COMMENTlink modified 12 months ago • written 12 months ago by moushengxu350
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1616 users visited in the last hour