无法在Centos 6.7

时间:2016-03-01 18:28:13

标签: mysql r linux

我无法在Centos 6.7服务器上安装RMySQL软件包。我已经完成了我的研究,似乎这是已知问题,但我还没有找到适用于我的机器的解决方案。我发现安装此软件包的初始链接就在link。但是,每当我尝试安装RMySQL包时,我都会收到以下错误,如果从CRAN或源代码下载软件包,我会收到同样的错误。

错误:

* 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

此时我没有想法,我相信我可能不得不使用rpm来安装mariadb-devel | mysql-devel ..但是我找不到源代码并且从未使用过这个rpm构建功能。

我已经读过libmysqlclient不在CentOS中,那就是问题,如果这是真的,我怎么能解决这个问题。如果其他人能够在他们的CentOS服务器上安装RMySQL,我将非常感谢一些帮助。谢谢

1 个答案:

答案 0 :(得分:1)

步骤1:sudo yum install mysql-devel在命令提示符

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