[R] RMySQL install on windows
Robert Baer
rbaer at atsu.edu
Tue Oct 9 23:08:30 CEST 2012
I have been trying to install RMySQL on Windows 7 following the
procedure at:
http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL
I think I have properly installed RTools and created a proper
Renviron.site file saying:
MYSQL_HOME="C:/Program Files/MySQL/MySQL Server 5.5"
When I try to install the packages from source, I get warnings that
suggest I'm still not quite "with the program" yet. There are comments
about POSIX paths that I don't quite grasp. Can anyone give me
additional hints?
There seems to be a libmysql.dll in the /lib subdirectory although the
install seems to be looking in the /bin directory for a file of similar
name. Is this something that has changed with recent versions of MySQL
that should be fixed in the RMySQL package or is it something I can work
around by hand or by properly setting some environmental variable?
Thanks,
Rob
The errors ...
> install.packages('RMySQL',type='source')
trying URL 'http://cran.wustl.edu/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 $MYSQL_HOME... C:/Program Files/MySQL/MySQL Server 5.5
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/MySQL/MySQL: unknown operand
** libs
Warning: 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-215~1.1/etc/x64/Makeconf
Preferred POSIX equivalent is:
/cygdrive/c/PROGRA~1/R/R-215~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-215~1.1/include" -DNDEBUG -I"C:/Program
Files/MySQL/MySQL Server 5.5"/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-215~1.1/include" -DNDEBUG -I"C:/Program
Files/MySQL/MySQL Server 5.5"/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/MySQL/MySQL Server 5.5/bin/libmySQL.dll
-Ld:/RCompile/CRANpkg/extralibs64/local/lib/x64
-Ld:/RCompile/CRANpkg/extralibs64/local/lib
-LC:/PROGRA~1/R/R-215~1.1/bin/x64 -lR
gcc.exe: error: C:/Program Files/MySQL/MySQL Server
5.5/bin/libmySQL.dll: No such file or directory
ERROR: compilation failed for package 'RMySQL'
* removing 'C:/Program Files/R/R-2.15.1/library/RMySQL'
The downloaded source packages are in
‘C:\Users\rbaer\AppData\Local\Temp\Rtmps9adPQ\downloaded_packages’
Warning messages:
1: running command 'C:/PROGRA~1/R/R-215~1.1/bin/x64/R CMD INSTALL -l
"C:/Program Files/R/R-2.15.1/library"
C:\Users\rbaer\AppData\Local\Temp\Rtmps9adPQ/downloaded_packages/RMySQL_0.9-3.tar.gz'
had status 1
2: In install.packages("RMySQL", type = "source") :
installation of package ‘RMySQL’ had non-zero exit status
> R.Version()
$platform
[1] "x86_64-pc-mingw32"
$arch
[1] "x86_64"
$os
[1] "mingw32"
$system
[1] "x86_64, mingw32"
$status
[1] ""
$major
[1] "2"
$minor
[1] "15.1"
$year
[1] "2012"
$month
[1] "06"
$day
[1] "22"
$`svn rev`
[1] "59607"
$language
[1] "R"
$version.string
[1] "R version 2.15.1 (2012-06-22)"
$nickname
[1] "Roasted Marshmallows"
More information about the R-help
mailing list