R安装 Rmysql 失败解析;

来源:互联网 发布:openwrt 安装软件 编辑:程序博客网 时间:2024/04/30 11:21

window 7 ,64系统 ,R , mysql 32bit;

安装 Rmysql 失败解析;

正常的教程网上很多,R中如何使用RMySQL分享


http://stackoverflow.com/questions/4785933/adding-rmysql-package-to-r-fails

这里有很多解决方案;可以尝试下,我就是在这里最终解决了问题;


Error in utils::readRegistry("SOFTWARE\\MySQL AB", hive = "HLM", maxdepth = 2) :Registry key 'SOFTWARE\MySQL AB' not found

Error : .onLoad failed in 'loadNamespace' for 'RMySQL'


解决方案1 3.02版本:

 Manually add MYSQL_HOME="c:/mysql" variable to the list of system variables

解决方案2 2.02版本: MYSQL_HOME=D:\MySQL\MySQLServer 5.5

   保存。然后修改该文本名和拓展名,改为Renviron.site 。把它放在文件夹D: \R\R-2.15.2\etc中


===

在出现 gcc 安装过程中失败 ; 

很可能是因为 cpu导致;

如果是64bit mysql 把  C:\Program Files\R\R-2.12.1\bin\x64 加入到环境变量中

如果是32bit cpu ,C:\Program Files\R\R-2.12.1\bin\i302 加入到环境中


I was having this same problem on Windows 7 with R 2.12.1 x64 and resolved it by:

  1. Changing the R directory in my PATH variable to C:\Program Files\R\R-2.12.1\bin\x64(rather than just ...\R-2.12.1\bin).
  2. Copying ...\MySQL Server 5.5\lib\libmysql.dll to ...\MySQL Server 5.5\bin\.
  3. Running R CMD INSTALL RMySQL_0.7-5.tar.gz in cmd.exe (install.packages('RMySQL',type='source') in R still would not work).
    Pasted from: <http://stackoverflow.com/questions/4785933/adding-rmysql-package-to-r-fails>
     ==
library("RMySQL", lib.loc="C:/Program Files/R/R-3.0.2/library")
Error: 程辑包‘RMySQL’没有安装在'arch=x64'中

切换 rstudio到  32 bit R环境中, tools ---options

原创粉丝点击