在CentOS 6.5上安装R包RMySQL失败“因为找不到mysql-connector-c”

时间:2015-10-22 05:28:22

标签: r linux centos

我在CentOS 6.5下的R终端内安装RMySQL但收到以下错误消息:

* installing to library ‘/usr/lib64/R/library’
* installing *source* package ‘RMySQL’ ...
** 成功将‘RMySQL’程序包解包并MD5和检查
Found INCLUDE_DIR and/or LIB_DIR!
Using PKG_CFLAGS=-I/usr/local/lib64/R/include/include
Using PKG_LIBS=-L/usr/local/lib64/R/lib -lmysqlclient -lz
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because mysql-connector-c was not found. Try installing:
 * deb: libmysqlclient-dev | libmariadbclient-dev (Debian, Ubuntu)
 * rpm: mariadb-devel | mysql-devel (Fedora, CentOS, RHEL)
 * csw: mysql56_dev (Solaris)
 * brew: mysql-connector-c (OSX)
If mysql-connector-c is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a mysql-connector-c.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’

以下是其他信息:

  1. 我已根据需要通过yum
  2. 安装了mysql-devel
  3. PKG_CONFIG_PATH已设置为“/ usr / lib64 / pkgconfig:/ usr / share / pkgconfig:/ usr / local / lib / pkgconfig”但是我无法找到文件“mysql-connector-c.pc”在整个系统上。
  4. 我已经被困在这里2天了,非常感谢你的帮助和建议!谢谢!

1 个答案:

答案 0 :(得分:0)

您可以在http://rpm.pbone.net/搜索mysql-connector-c以获取概述。

请注意,CentOS没有可用的mysql-connector-c软件包。仅在搜索Redhat EL6和EL7时出现。

另请注意,“mysql-connector-c-devel”软件包似乎没有文件“mysql-connector-c.pc”