安装RMySQL以与InfiniDB一起使用(不完全安装mysql)

Enz*_*nzo 1 r rmysql infinidb

我在CENTOS 6.5上成功安装了InifiniDB.InfiniDB是一个与MySQL"兼容"的柱状数据库(相同的端口等:我甚至设法安装了最新版本的MySQLWorkbench,并且工作有一个InifiniDB的魅力 - 相信只处理另一个MySQL安装).

安装没有MySQL,因为我不需要它:)

我试图从RStudio Server安装RMySQL,但我无法安装:安装期望在某处找到MySQL的副本而我没有.

请参阅下面的安装日志.我把:/ usr/local/Calpont/mysql/bin放在我的PATH中,但这没有任何效果.

请考虑一下这个灵感来自InfiniDB本身:请参阅http://infinidb.co/system/files/Calpont%20InfiniDB_Quick%20Start_for%20R.pdf 我认为比较错误和InfiniDB文件的主要问题是他们建议创建以下全局变量:

(From InfiniDB paper) RMySQL must be configured with the correct MySQL directory 
(which comes with InfiniDB) and the developer library directory. 
o Example in Ubuntu or CentOS: 
export MYSQL_INC=”/usr/include/mysql/”
export MYSQL_LIB=”/usr/local/Calpont/mysql/lib/mysql”
Run Code Online (Sandbox Code Playgroud)

但我在CENTOS上的安装在/ usr/include/mysql /上没有mysql文件夹.

有什么建议?

==============

Installing package into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/RMySQL_0.9-3.tar.gz'
Content type 'application/x-gzip' length 165363 bytes (161 Kb)
opened URL
==================================================
downloaded 161 Kb

* installing *source* package ‘RMySQL’ ...
** package ‘RMySQL’ successfully unpacked and MD5 sums checked
    checking for gcc... gcc

checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for compress in -lz... yes
checking for getopt_long in -lc... yes
checking for mysql_init in -lmysqlclient... no
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes

checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking mysql.h usability... no
checking mysql.h presence... no
checking for mysql.h... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking /usr/local/include/mysql/mysql.h usability... no
checking /usr/local/include/mysql/mysql.h presence... no
checking for /usr/local/include/mysql/mysql.h... no
checking /usr/include/mysql/mysql.h usability... no
checking /usr/include/mysql/mysql.h presence... no
checking for /usr/include/mysql/mysql.h... no
checking /usr/local/mysql/include/mysql/mysql.h usability... no
checking /usr/local/mysql/include/mysql/mysql.h presence... no
checking for /usr/local/mysql/include/mysql/mysql.h... no
checking /opt/include/mysql/mysql.h usability... no
checking /opt/include/mysql/mysql.h presence... no
checking for /opt/include/mysql/mysql.h... no
checking /include/mysql/mysql.h usability... no
checking /include/mysql/mysql.h presence... no
checking for /include/mysql/mysql.h... no

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.

INSTRUCTIONS:

1. Define and export the 2 shell variables PKG_CPPFLAGS and
   PKG_LIBS to include the directory for header files (*.h)
   and libraries, for example (using Bourne shell syntax):

      export PKG_CPPFLAGS="-I<MySQL-include-dir>"
      export PKG_LIBS="-L<MySQL-lib-dir> -lmysqlclient"

   Re-run the R INSTALL command:

      R CMD INSTALL RMySQL_<version>.tar.gz

2. Alternatively, you may pass the configure arguments
      --with-mysql-dir=<base-dir> (distribution directory)
   or
      --with-mysql-inc=<base-inc> (where MySQL header files reside)
      --with-mysql-lib=<base-lib> (where MySQL libraries reside)
   in the call to R INSTALL --configure-args='...' 

   R CMD INSTALL --configure-args='--with-mysql-dir=DIR' RMySQL_<version>.tar.gz

ERROR: configuration failed for package ‘RMySQL’
* removing ‘/usr/lib64/R/library/RMySQL’
Warning in install.packages :
  installation of package ‘RMySQL’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmpz2Q4Wl/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Run Code Online (Sandbox Code Playgroud)

小智 5

你需要安装mysql-devel.请参阅InfiniDB网站上的QuickStart Guide for R的第3步.它陈述如下:

在客户端计算机上安装MySQL开发人员库.可从http://www.mysql.comhttp://dev.mysql.com获得,也可以使用像apt-get这样的包安装程序.如果您已经安装了MySQL服务器,请确保安装中包含客户端头文件和库文件.

Ubuntu中的示例:

sudo apt-get install mysql-client libmysqlclient-dev 
Run Code Online (Sandbox Code Playgroud)

CentOS中的示例

sudo yum install mysql mysql-devel
Run Code Online (Sandbox Code Playgroud)

如果您还有其他问题,请随时在InfiniDB论坛上发帖.