R包devtools为HTTR包安装错误

时间:2012-09-11 18:19:00

标签: r github httr

尝试从R中的Github安装Hadley的HTTR软件包时出现以下错误。

> library(devtools)
> install_github("httr")
Installing github repo(s) httr/master from hadley
Installing httr.zip from https://github.com/hadley/httr/zipball
Installing httr
* checking for file 'C:\Users\btibert\AppData\Local\Temp\RtmpSGjjYA\hadley-httr-ee0eafb/DESCRIPTION' ... OK
* preparing 'httr':
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* looking to see if a 'data/datalist' file should be added
Error in if (any(update)) { : missing value where TRUE/FALSE needed
Execution halted
Error: Command failed (1)
In addition: Warning message:
running command '"C:/PROGRA~1/R/R-215~1.0/bin/i386/R" CMD build "C:\Users\btibert\AppData\Local\Temp\RtmpSGjjYA\hadley-httr-ee0eafb" --no-manual --no-vignettes' had status 1 

不确定我的问题是什么。这是我在Windows 7上的版本信息:

$platform
[1] "i386-pc-mingw32"

$arch
[1] "i386"

$os
[1] "mingw32"

$system
[1] "i386, mingw32"

$status
[1] ""

$major
[1] "2"

$minor
[1] "15.0"

$year
[1] "2012"

$month
[1] "03"

$day
[1] "30"

$`svn rev`
[1] "58871"

$language
[1] "R"

$version.string
[1] "R version 2.15.0 (2012-03-30)"

$nickname
[1] ""

更新:有人建议尝试安装开发版的devtools。我收到了这个错误:

> library(devtools)
> install_github("devtools")
Installing github repo(s) devtools/master from hadley
Installing devtools.zip from https://github.com/hadley/devtools/zipball
Installing devtools
* checking for file 'C:\Users\btibert\AppData\Local\Temp\RtmpsbYABm\hadley-devtools-77011a6/DESCRIPTION' ... OK
* preparing 'devtools':
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'devtools_0.8.tar.gz'
cygwin warning:
  MS-DOS style path detected: C:/Users/btibert/AppData/Local/Temp/RtmpsbYABm/devtools_0.8.tar.gz
  Preferred POSIX equivalent is: /cygdrive/c/Users/btibert/AppData/Local/Temp/RtmpsbYABm/devtools_0.8.tar.gz
  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

Warning: invalid package 'Files/R/R-2.15.0/library'
Error: ERROR: cannot cd to directory 'C:/Program'
Error: Command failed (1)
In addition: Warning message:
running command '"C:/PROGRA~1/R/R-215~1.0/bin/i386/R" CMD INSTALL C:\Users\btibert\AppData\Local\Temp\RtmpsbYABm/devtools_0.8.tar.gz --library=C:/Program Files/R/R-2.15.0/library' had status 1 

2 个答案:

答案 0 :(得分:1)

您是否尝试过开发版devtools?

install_github("devtools")
install_github("httr")

最近有同样的问题,这就是修复......

答案 1 :(得分:-1)

试试这个 install.packages(注明 “DevTools”)

否则尝试此操作并安装所需的包 apt-get -y install libcurl4-gnutls-dev apt-get -y build-dep libcurl4-gnutls-dev

相关问题