我不知道为什么我的RMySQL软件包无法安装-这是我得到的:
> install.packages('RMySQL',type='source') trying URL 'http://cran.mirrors.hoobly.com/src/contrib/RMySQL_0.7-5.tar.gz' Content type 'application/x-gzip' length 160769 bytes (157 Kb) opened URL downloaded 157 Kb * installing *source* package 'RMySQL' ... ERROR: configuration failed for package 'RMySQL' * removing 'C:/PROGRA~1/R/R-212~1.0/library/RMySQL' The downloaded packages are in '(foo)' Warning message: In install.packages("RMySQL", type = "source") : installation of package 'RMySQL' had non-zero exit status
我认为MySQL安装没有问题,因为正确的值似乎在注册表中:
> Sys.getenv('MYSQL_HOME') MYSQL_HOME "C:/PROGRA~1/MySQL/MYSQLS~1.1/" > readRegistry("SOFTWARE\\MySQL AB", hive="HLM", maxdepth=2) $`MySQL Server 5.1` $`MySQL Server 5.1`$DataLocation [1] "C:\\Documents and Settings\\All Users\\Application Data\\MySQL\\MySQL Server 5.1\\" $`MySQL Server 5.1`$FoundExistingDataDir [1] "0" $`MySQL Server 5.1`$Location [1] "C:\\Program Files\\MySQL\\MySQL Server 5.1\\" $`MySQL Server 5.1`$Version [1] "5.1.54"
困惑。任何帮助将不胜感激!
这里描述了基本过程,但是有一些提示,因此,我将描述整个解决方案 (如果需要,请更改R版本和路径) :
C:\Program Files\R\R-2.12.1\etc\Renviron.site
MYSQL_HOME=C:/mysql
C:\Program Files\R\R-2.12.1\bin
windows/system32
install.packages('RMySQL',type='source')
这在Windows 7 64位版本上对我有效,因此32位版本应该没有问题
最初发布在这里(类似的问题)。