简体   繁体   中英

cannot install R package RMySQL on Centos 6.7

I cannot install the RMySQL package on my Centos 6.7 server. I've done my research and it seems that this is known issue but I haven't found a solution that works on my machine. the initial link I found to install this package is right here link . However, whenever I try to install the RMySQL package I get the following error, and I get the same error if I download the package from CRAN or from source.

ERROR:

* installing *source* package ‘RMySQL’ ...
** package ‘RMySQL’ successfully unpacked and MD5 sums checked
Found mysql_config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC  -fPIC  -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1
Using PKG_LIBS=-L/usr/lib64/mysql -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libmysqlclient was not found. Try installing:
 * deb: libmysqlclient-dev | libmariadb-client-lgpl-dev (Debian)
        libmysqlclient-dev | libmariadbclient-dev (Ubuntu)
 * rpm: mariadb-devel | mysql-devel (Fedora, CentOS, RHEL)
 * csw: mysql56_dev (Solaris)
 * brew: mysql-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 ‘/usr/lib64/R/library/RMySQL’

The downloaded source packages are in
    ‘/tmp/RtmpbWSzgQ/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("RMySQL") :
  installation of package ‘RMySQL’ had non-zero exit status

At this point I am out of ideas, I believe I may have to use rpm to install mariadb-devel | mysql-devel.. but I cannot find the source code and have never used this rpm build feature.

I've read that libmysqlclient is not in CentOS and thats the issue, If thats true how can I work around this fact. If anyone else has been able to install RMySQL on their CentOS server I would greatly appreciate some help. Thanks

STEP 1 : sudo yum install mysql-devel on command prompt

STEP 2: install.packages("https://cloud.r-project.org/src/contrib/RMySQL_0.10.9.tar.gz")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM