Mysql 5.5的RMySQL安装问题

时间:2011-10-18 08:29:29

标签: mysql r installation rmysql

我对R很新,但我在编程方面有一些经验。 我正在尝试使用MySQL Workbench 5.2在Windows 7上安装RMySQL,并且我继续遇到相同的错误。我已经检查了不同的程序,但继续陷入困境:

http://vhaguiar.wordpress.com/2011/06/06/r-how-to-install-rmysql-in-windows-7-with-mysql-5-5/

http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL

MySQL启动并运行,我已经移动了libmysql.lib和libmysql.dll,但我继续收到以下错误。我想我看不出它究竟是什么问题。你有什么建议吗?

install.packages("RMySQL", type="source")
--- Please select a CRAN mirror for use in this session ---
provo con l'URL 'http://cran.rakanu.com/src/contrib/RMySQL_0.8-0.tar.gz'
Content type 'application/x-gzip' length 160735 bytes (156 Kb)
URL aperto
downloaded 156 Kb

 ** installing *source* package 'RMySQL' ...
 ERROR: configuration failed for package 'RMySQL'
 * removing 'C:/Program Files/R/R-2.13.2/library/RMySQL'
 The downloaded packages are in
 ‘C:\Users\Matteo\AppData\Local\Temp\RtmpYHjzuR\downloaded_packages’
 Warning messages:
 1: running command 'C:/PROGRA~1/R/R-213~1.2/bin/i386/R CMD INSTALL -l "C:/Program               Files/R/R-2.13.2/library"        C:\Users\Matteo\AppData\Local\Temp\RtmpYHjzuR/downloaded_packages/RMySQL_0.8-0.tar.gz' had status 1 
 2: In install.packages("RMySQL", type = "source") :
   installation of package 'RMySQL' had non-zero exit status
  Sys.getenv('MYSQL_INC')
 [1] ""
   Sys.getenv('MYSQL_LIB')
 [1] ""
 Sys.getenv('MYSQL_DIR')
 [1] ""
 Sys.getenv('MYSQL_HOME')
 [1] "C:/PROGRA~1/MySQL/MYSQLS~1.5/"
 Sys.getenv('MYSQL_INC')
 [1] ""
  Sys.getenv('MYSQL_LIB')
 [1] ""
  Sys.getenv('MYSQL_DIR')
 [1] ""
  Sys.getenv('MYSQL_HOME')
 [1] "C:/PROGRA~1/MySQL/MYSQLS~1.5/"*

这都是使用R版本2.13.2。

1 个答案:

答案 0 :(得分:0)

我最近在WinXP 32位上安装了RMySQL,但也遇到了一些问题。我已经记录了我在以下link

中找到的问题和解决方案

我几天前也跟进了包维护者。我还没有收到回复。希望我们能更好地记录这个过程。看来你的问题可以通过发出r语句来解决:

Sys.setenv(“MYSQL_HOME”=”C:/PROGRA~1/MySQL/MYSQLS~1.5″)

安装RMySQL之前。