在Windows上从源代码编译RCurl

时间:2014-07-29 19:35:19

标签: r curl compilation windows-8.1 rcurl

由于v1.95-4.3还没有Windows二进制文件,我需要在Windows 8.1上从源代码安装/编译RCurl包。 (64位)。

有人能告诉我吗

  1. 我需要哪个版本的cURL
  2. 需要准确放置libcurl.dll等各种文件
  3. 下面的错误消息中提到的x64目录是否与R安装的x64目录相对应?

    > 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
    

    非常感谢!

2 个答案:

答案 0 :(得分:2)

看起来Windows的RCurl v1.95-4.3二进制文件已于今天上午上传到CRAN。我正在处理与你完全相同的问题,并且在从源代码构建二进制文件之后,我再次使用了RCurl,这一切都很好!

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

install.packages("RCurl_1.95-4.3.zip", repos=NULL, type="source")

答案 1 :(得分:1)

不确定您的计算机上有哪个版本的cURL,但正如this网站上所述,版本7.37.0似乎适用于Windows 8

EDIT 您可以尝试手动下载。它指定您提到的.dll文件,并与64位兼容 http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.15/