Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling RCurl from source on Windows

As there is no Windows binary for v1.95-4.3 yet, I need to install/compile the RCurl package from source on Windows 8.1. (64 bit).

Could someone tell me

  1. Which version of cURL I need
  2. Where the various files such as libcurl.dll etc. need to be placed exactly

Does the x64 directory mentioned in the error message below correspond to the x64 directory of the R installation?

> install.packages("RCurl", type="source")
trying URL 'http://cran.rstudio.com/src/contrib/RCurl_1.95-4.3.tar.gz'
Content type 'application/x-gzip' length 879143 bytes (858 Kb)
opened URL
downloaded 858 Kb

* installing *source* package 'RCurl' ...
** package 'RCurl' successfully unpacked and MD5 sums checked
Please set LIB_CURL
cygwin warning:
  MS-DOS style path detected: Q:/home
  Preferred POSIX equivalent is: /cygdrive/q/home
  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
cp: cannot stat `/x64/ssl/bin/*.dll': No such file or directory
cp: cannot stat `/x64/bin/libcurl-4.dll': No such file or directory
cp: cannot stat `/x64/bin/libz.dll': No such file or directory
Warning: running command 'sh ./configure.win' had status 1
ERROR: configuration failed for package 'RCurl'
* removing 'Q:/home/apps/rapptools/apps/r/R-3.1.1/library/RCurl'
Warning in install.packages :
  running command '"Q:/home/apps/RAPPTO~1/apps/r/R-31~1.1/bin/x64/R" CMD INSTALL -l "Q:\home\apps\rapptools\apps\r\R-3.1.1\library" C:\Users\RAPPST~1\AppData\Local\Temp\Rtmp0MmGz8/downloaded_packages/RCurl_1.95-4.3.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘RCurl’ had non-zero exit status

Thanks a lot!

like image 898
Rappster Avatar asked Apr 25 '26 00:04

Rappster


2 Answers

Looks like the RCurl v1.95-4.3 binary file for Windows has been uploaded to CRAN as of this morning. I was dealing with the exact same issue as you, and after building the binary file from source, all was well with my usage of RCurl again!

http://cran.r-project.org/web/packages/RCurl/index.html

install.packages("RCurl_1.95-4.3.zip", repos=NULL, type="source")
like image 58
David Corea Avatar answered Apr 26 '26 18:04

David Corea


Not sure which version of cURL you have on your machine, but as it states on this website that version 7.37.0 seems to work for Windows 8

EDIT You can try this manual download. It specifies the .dll files you mentioned and is compatible with 64 bit http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.15/

like image 27
GK89 Avatar answered Apr 26 '26 18:04

GK89