简体   繁体   中英

unzip() fails using install_github

A number of people in my team are having issues installing packages from Github using install_github on Windows 7 Enterprise. However, I do not have these issues on the same build. For example, when trying to install readr , they see the following:

> devtools::install_github("hadley/readr")
Using GitHub PAT from envvar GITHUB_PAT
Downloading GitHub repo hadley/readr@master
from URL https://api.github.com/repos/hadley/readr/zipball/master
Error in utils::unzip(src, exdir = target) : 
  cannot open file 'C:/Users/XXXXX/AppData/Local/Temp/RtmpYVS4zi/devtools23d42e596b7c/tidyverse-readr-b8c3ddb/R/POSIXct.R': No such file or directory

They have write access to the TMP folder into which these files are being extracted.

Interestingly enough when they download the zip directly from Github's website and try to extract into their user folder, they get the same behaviour from Winzip, but 7-zip can successfully unpack the file.

Does anyone know what might be causing this behaviour?

Try running options(unzip = "internal") before running devtools::install_github . This has worked for me in the past, not sure why.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM