Compiling RCurl from source on Windows

允我心安 提交于 2019-12-10 20:26:45

问题


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!


回答1:


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")



回答2:


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/



来源:https://stackoverflow.com/questions/25023540/compiling-rcurl-from-source-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!