首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装RMySQL以便与InfiniDB一起使用(不完全安装mysql )

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

Stack Overflow用户
提问于 2014-02-22 23:20:50
回答 2查看 1.9K关注 0票数 1

我已经在CentOS6.5上成功地安装了InifiniDB。InfiniDB是一个与MySQL“兼容”的柱状DB (相同端口等:我甚至成功地安装了最新版本的MySQLWorkbench,并且对InifiniDB有一种魅力--相信只需要处理另一个MySQL安装)。

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

我试图从RMySQL服务器安装RStudio,但无法安装:安装时希望在某个地方找到MySQL的副本,但我没有。

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

请考虑到这一点的灵感来自于InfiniDB本身:参见这里的for%20R.pdf --我想主要的问题是比较错误和InfiniDB论文--他们建议创建以下全局变量:

代码语言:javascript
复制
(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”

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

有什么建议吗?

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

代码语言:javascript
复制
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
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2014-02-23 10:29:45

我找到了一种解决办法。

首先,我的前提是能够将RMySQL与InfiniDB一起使用,而无需向混合设备中添加MySQL安装。

(根据维基百科) "InfiniDB是通过MySQL接口访问的“。最近在InfiniDB网站上发表的一篇关于R和InifiniDB的论文("R统计计算快速启动指南“)列出了在R+ RMySQL中安装和使用InfiniDB的简单说明,而没有提到任何先决条件。

我发现这是不正确的。在安装CENTOS的过程中,我无法编译RMySQL包。失踪的没药在阻止它。

我找到的解决方案是用yum安装mysql-devel。Yum还安装了mysql客户端程序和共享库作为依赖项。

另一方面,yum的总安装是3MB,我仍然可以说我不需要安装MySQL服务器(至少!)因为RMySQL+InfiniDB只需要MySQL库就可以工作。

票数 1
EN

Stack Overflow用户

发布于 2014-02-24 16:25:59

您确实需要安装mysql-devel。请在QuickStart网站上查看InfiniDB指南的步骤3。它规定如下:

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

Ubuntu的例子:

代码语言:javascript
复制
sudo apt-get install mysql-client libmysqlclient-dev 

CentOS中的示例

代码语言:javascript
复制
sudo yum install mysql mysql-devel

如果您有进一步的问题,请随时张贴在InfiniDB论坛以及。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21961984

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档