使用install_github时出错:'exdir'不存在 [英] Error when using install_github: 'exdir' does not exist
问题描述
我试图从github安装一个包,但一直收到以下错误;
Unzip中的错误(src ,list = TRUE):'exdir'不存在。
我猜测unzip没有权限创建一个目录来解压缩,但是我不知道如何将参数传递给exdir参数。
> require(devtools)
> install_github(rvertnet,ropensci)
从ropensci安装github repo(s)rvertnet / master
从https://api.github.com/repos/安装rvertnet.zip ropensci / rvertnet / zipball / master
unzip错误(src,list = TRUE):'exdir'不存在
这是我第一次从github安装,所以我可能会错过一些非常简单的事情。我尝试过使用其他软件包( ggplot2
),并得到相同的错误信息。
$ b 编辑:添加了 sessionInfo()
:
> sessionInfo()
R版本2.15.1(2012-06-22)
平台:i386-pc-mingw32 / i386(32位)
语言环境:
[1] LC_COLLATE = English_Canada.1252 LC_CTYPE = English_Canada.1252 LC_MONETARY = English_Canada.1252
[4] LC_NUMERIC = C LC_TIME = English_Canada.1252
附加的基本套餐:
[1] stats graphics grDevices utils数据集方法base
其他附加软件包:
[1] devtools_0.8
通过命名空间加载(并未附加):
[1] digest_0.5.2 evaluate_0.4.2 httr_0.1.1 memoise_0.1 parallel_2.15.1 plyr_1.7.1
[7] RCurl_1.91-1.1 stringr_0.6.1 tools_2.15.1 whisker_0.1
我已将 TMP
, TMPDIR
和 TEMP
通过renviron.site写入可写文件夹:
> Sys.getenv(c(TMP,TEMP,TMPDIR))
TMP TEMP TMPDIR
H:\\R\\tempH:\\\ \\ R \\tempH:\\\\\\\\\\\\\\\\\\\\\\\\\\\\' >解决方案
我有它的工作,这绝对是愚蠢的人为错误。我的工作目录以某种方式设置为我没有写入权限的位置。我 setwd()
到我有权限的文件夹,它工作得很好。我不确定它是否是解决方案的一部分,但@ hadley关于设置 TMP
envvar的提示很好,并且通常会很有用。
I am trying to install a package from github, but keep getting the following error;
"Error in unzip(src, list = TRUE) : 'exdir' does not exist".
I'm guessing that unzip doesn't have permission to create a directory to unzip into, but I don't know a way to pass a parameter in to the exdir argument.
> require(devtools)
> install_github("rvertnet", "ropensci")
Installing github repo(s) rvertnet/master from ropensci
Installing rvertnet.zip from https://api.github.com/repos/ropensci/rvertnet/zipball/master
Error in unzip(src, list = TRUE) : 'exdir' does not exist
This is my first time installing from github, so I may be missing something really simple. I did try with other packages (ggplot2
) and got the same error.
Edit: added results from sessionInfo()
:
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252
[4] LC_NUMERIC=C LC_TIME=English_Canada.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_0.8
loaded via a namespace (and not attached):
[1] digest_0.5.2 evaluate_0.4.2 httr_0.1.1 memoise_0.1 parallel_2.15.1 plyr_1.7.1
[7] RCurl_1.91-1.1 stringr_0.6.1 tools_2.15.1 whisker_0.1
I have set my TMP
, TMPDIR
, and TEMP
to a writeable folder via renviron.site:
> Sys.getenv(c("TMP","TEMP","TMPDIR"))
TMP TEMP TMPDIR
"H:\\R\\temp" "H:\\R\\temp" "H:\\R\\temp"
I have got it working, and it was definitely just dumb human error. My working directory was somehow set to a location for which I didn't have write permissions. I setwd()
to a folder where I have permissions and it worked just fine. I'm not sure if it was part of the solution, but @hadley's tip about setting the TMP
envvar was good, and will be useful in general.
这篇关于使用install_github时出错:'exdir'不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!