簡體   English   中英

在Windows中安裝RMySQL嗎?

[英]Install RMySQL in windows?

我按照博客文章在Windows下安裝RMySQL的說明進行操作。 該軟件包似乎已安裝,但實際上失敗了。

安裝輸出:

* installing *source* package 'RMySQL' ...
** package 'RMySQL' successfully unpacked and MD5 sums checked
checking for $MYSQL_HOME... C:/Program Files (x86)/MySQL/mysql-5.6.21-winx64/mysql-5.6.21-winx64
cygwin warning:
  MS-DOS style path detected: C:/Program
  Preferred POSIX equivalent is: /cygdrive/c/Program
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
test: Files: unknown operand
** libs
Aviso: this package has a non-empty 'configure.win' file,
so building only the main architecture

cygwin warning:
  MS-DOS style path detected: C:/PROGRA~1/R/R-31~1.1/etc/x64/Makeconf
  Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-31~1.1/etc/x64/Makeconf
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
gcc -m64 -I"C:/PROGRA~1/R/R-31~1.1/include" -DNDEBUG -I"C:/Program Files (x86)/MySQL/mysql-5.6.21-winx64/mysql-5.6.21-winx64"/include    -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c RS-DBI.c -o RS-DBI.o
RS-DBI.c: In function 'RS_na_set':
RS-DBI.c:1219:11: warning: variable 'c' set but not used [-Wunused-but-set-variable]
gcc -m64 -I"C:/PROGRA~1/R/R-31~1.1/include" -DNDEBUG -I"C:/Program Files (x86)/MySQL/mysql-5.6.21-winx64/mysql-5.6.21-winx64"/include    -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c RS-MySQL.c -o RS-MySQL.o
RS-MySQL.c: In function 'RS_MySQL_fetch':
RS-MySQL.c:657:13: warning: variable 'fld_nullOk' set but not used [-Wunused-but-set-variable]
RS-MySQL.c: In function 'RS_DBI_invokeBeginGroup':
RS-MySQL.c:1137:30: warning: variable 'val' set but not used [-Wunused-but-set-variable]
RS-MySQL.c: In function 'RS_DBI_invokeNewRecord':
RS-MySQL.c:1158:20: warning: variable 'val' set but not used [-Wunused-but-set-variable]
RS-MySQL.c: In function 'RS_MySQL_dbApply':
RS-MySQL.c:1219:38: warning: variable 'fld_nullOk' set but not used [-Wunused-but-set-variable]
gcc -m64 -shared -s -static-libgcc -o RMySQL.dll tmp.def RS-DBI.o RS-MySQL.o C:/Program Files (x86)/MySQL/mysql-5.6.21-winx64/mysql-5.6.21-winx64/bin/libmySQL.dll -Ld:/RCompile/CRANpkg/extralibs64/local/lib/x64 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LC:/PROGRA~1/R/R-31~1.1/bin/x64 -lR
gcc.exe: error: C:/Program Files (x86)/MySQL/mysql-5.6.21-winx64/mysql-5.6.21-winx64/bin/libmySQL.dll: No such file or directory
no DLL was created
ERROR: compilation failed for package 'RMySQL'
* removing 'C:/Users/EdmondGA/Documents/R/win-library/3.1/RMySQL'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-31~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\EdmondGA\Documents\R\win-library\3.1" C:\Users\EdmondGA\AppData\Local\Temp\Rtmpc9ayHH/downloaded_packages/RMySQL_0.9-3.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘RMySQL’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\EdmondGA\AppData\Local\Temp\Rtmpc9ayHH\downloaded_packages’

但是,當我嘗試使用該庫時,出現以下錯誤:

library(RMySQL)
Error in library(RMySQL) : there is no package called ‘RMySQL’

如何正確安裝RMySQL?

我將使用RStudio ,它具有Windows安裝程序。 從那里,您可以運行:

install.packages('RMySQL')

我不確定RStudio是什么,但它似乎與RMySQL軟件包集成得很好

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM