4

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"
andyteucher
  • 1,393
  • 14
  • 21
  • 1
    I'm from ropensci and I just tested this. Worked fine on my machine. What version of devtools do you have? Can you update the question with results from `sessionInfo()`? You are also welcome to post an issue on the repo or email us at support@ropensci.org – Maiasaura Oct 10 '12 at 22:10
  • 1
    The other option I'd suggest is for you to clone the repo locally. Then set your working dir to its parent and run `install('vertnet')` from the R prompt after loading `devtools`. – Maiasaura Oct 10 '12 at 22:35
  • 4
    It unzips it to a `tempdir()`, so set the `TMP` envvar to somewhere writeable. – hadley Oct 10 '12 at 22:54
  • Thanks @hadley that's good to know when people report this issue in future. – Maiasaura Oct 10 '12 at 22:55
  • Thanks very much @hadley and @Maiasaura. Please see edits above. I have set the TMP envvar to a writeable location, but I get thes same error. @Maiasaura, I don't think it's a specific `rvertnet` problem, it's something with my system... – andyteucher Oct 11 '12 at 17:12

1 Answers1

6

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.

andyteucher
  • 1,393
  • 14
  • 21