Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install_github fails with unzip error #96

Closed
r-pkgs-bot opened this issue Aug 2, 2017 · 15 comments

Comments

Projects
None yet
3 participants
@r-pkgs-bot
Copy link

commented Aug 2, 2017

Issue by plantarum
Thursday Feb 23, 2017 at 17:58 GMT
Originally opened as r-lib/devtools#1464


I'm trying to install my own package from github: plantarum/flowPloidy, onto a Windows computer. Starting from a fresh session, installing devtools from Cran, I try:

install_github("plantarum/flowPloidy", dependencies = TRUE)

This fails with:

Error in utils::unzip(src, exdir = target) : 
  cannot open file 'C:/Users/jamest/AppData/Local/Temp/RtmpKWeuxp/devtools1fc45f5c7551/plantarum-flowPloidy-88ad2c0/R/FlowHist.R': No such file or directory

I looked into those directories, and the toplevel directory 'C:/Users/jamest/AppData/Local/Temp/RtmpKWeuxp/devtools1fc45f5c7551/plantarum-flowPloidy-88ad2c0/ is there, and in the downloaded zip file the R folder exists and contains all the code files as you expect.

I tried debugging my way through the code, and got as far as the function get0 before I gave up trying to figure out the ultimate source of the error.

install_github works no problem for this package under Linux.

Thanks for any help or suggestions,

Tyler

R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"

@r-pkgs-bot

This comment has been minimized.

Copy link
Author

commented Aug 2, 2017

Comment by plantarum
Thursday Feb 23, 2017 at 18:25 GMT


I just tried installing the zip file directly and got the same problem, so the problem is probably not with devtools itself?

install.packages("C:/Users/jamest/Downloads/flowPloidy-master.zip", repos = NULL, type = "win.binary")
Error in install.packages : cannot open file 'C:/Users/jamest/Documents/R-3.3.2/library/file4e4c8cc0b/flowPloidy-master/R/FlowHist.R': No such file or directory
@r-pkgs-bot

This comment has been minimized.

Copy link
Author

commented Aug 2, 2017

Comment by jianlingfan
Monday Mar 13, 2017 at 20:25 GMT


I have the same problem for several weeks too, still looking for a solution.

@r-pkgs-bot

This comment has been minimized.

Copy link
Author

commented Aug 2, 2017

Comment by alex23lemm
Tuesday Apr 04, 2017 at 18:54 GMT


Today, I ran into the problem by letting several people install the tutor package using devtools. All Mac and Linux users had no issues and also the installation for the majority of the Windows users went well.

However, some of the Windows users ran into the problem described above which looked as follows in our case:

> devtools::install_github("rstudio/tutor")
Downloading GitHub repo rstudio/tutor@master
from URL https://api.github.com/repos/rstudio/tutor/zipball/master
Error in utils::unzip(src, exdir = target) : 
 cannot open file 'C:/Users/mshumper/AppData/Local/Temp/RtmpeE4D2Q/devtools23e061002ad9/rstudio-tutor-1476bf6/R/ace.R': No such file or directory

All users installed the current R version 3.3.3 and the current RStudio version 1.0.136 today prior to trying to install tutor via devtools.

Even though I am on Windows as well I was not able to reproduce the bug on my machine.

@r-pkgs-bot

This comment has been minimized.

Copy link
Author

commented Aug 2, 2017

Comment by dfifield
Wednesday Apr 12, 2017 at 15:08 GMT


This sounds very similar to the problem described in Issue #1433. The work-around was to get rid of .Rbuildignore.

@r-pkgs-bot

This comment has been minimized.

Copy link
Author

commented Aug 2, 2017

Comment by hadley
Tuesday Aug 01, 2017 at 21:17 GMT


@gaborcsardi @jimhester have you seen this before?

@r-pkgs-bot

This comment has been minimized.

Copy link
Author

commented Aug 2, 2017

Comment by gaborcsardi
Tuesday Aug 01, 2017 at 21:31 GMT


Haven't. Can't reproduce. Maybe a "wrong" unzip program again? Although I am not sure how removing .Rbuildignore would fix that....

@r-pkgs-bot

This comment has been minimized.

Copy link
Author

commented Aug 2, 2017

Comment by imanuelcostigan
Wednesday Aug 02, 2017 at 10:26 GMT


This looks like the same bug that has been bedevilling my team for years (!). We all have Windows 7 x64 PC, each with the same corporate "build" and have same admin privileges. Yet install_github() works on my PC, but not on any other person's PC. Everyone else has this same issue. See this SO thread: https://stackoverflow.com/questions/41293748/unzip-fails-using-install-github/41293968

In particular, note this behaviour:

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.

I've spent quite a bit of time debugging this all to no avail. Squashing this bug would be massive for us.

@r-pkgs-bot

This comment has been minimized.

Copy link
Author

commented Aug 2, 2017

Comment by gaborcsardi
Wednesday Aug 02, 2017 at 11:24 GMT


@imanuelcostigan Can you pls share a zip file that is problematic, and also the winzip version your colleagues have?

@r-pkgs-bot

This comment has been minimized.

Copy link
Author

commented Aug 2, 2017

Comment by hadley
Wednesday Aug 02, 2017 at 12:51 GMT


@imanuelcostigan you might also try comparing getOption("unzip") on your computer vs. your colleagues

@r-pkgs-bot

This comment has been minimized.

Copy link
Author

commented Aug 2, 2017

Comment by hadley
Wednesday Aug 02, 2017 at 21:00 GMT


It's possible that this may also be related to the path length.

@r-pkgs-bot

This comment has been minimized.

Copy link
Author

commented Aug 2, 2017

Comment by gaborcsardi
Wednesday Aug 02, 2017 at 21:02 GMT


@hadley In the original error, the path is only about 90 characters long, that should be ok.

@r-pkgs-bot

This comment has been minimized.

Copy link
Author

commented Aug 2, 2017

Comment by hadley
Wednesday Aug 02, 2017 at 21:03 GMT


@gaborcsardi good point. I'll keep the other issue open

@imanuelcostigan

This comment has been minimized.

Copy link

commented Aug 3, 2017

Note there are a few more recent comments on the original thread which haven't been migrated to this issue.

@pgwatson

This comment has been minimized.

Copy link

commented Aug 3, 2017

getOption(“unzip”) also yields “internal” and fails for me

However if I set the unzip option to point to the unzip.exe program bundled with the github application then everything appears to work correctly.

The version info for unzip.exe bundled with github is

Github/unzip.exe -v
UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.

Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.

Compiled with gcc 4.9.2 for Unix (Cygwin) on Nov 4 2014.

UnZip special compilation options:
ACORN_FTYPE_NFS
ASM_CRC
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
SET_DIR_ATTRIB
SYMLINKS (symbolic links supported, if RTL and file system permit)
TIMESTAMP
UNIXBACKUP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
UNICODE_SUPPORT [wide-chars, char coding: UTF-8] (handle UTF-8 paths)
MBCS-support (multibyte character support, MB_CUR_MAX = 6)
LARGE_FILE_SUPPORT (large files over 2 GiB supported)
ZIP64_SUPPORT (archives using Zip64 for large files supported)
USE_BZIP2 (PKZIP 4.6+, using bzip2 lib version 1.0.6, 6-Sept-2010)
VMS_TEXT_CONV
WILD_STOP_AT_DIR
[decryption, version 2.11 of 05 Jan 2007]

UnZip and ZipInfo environment options:
UNZIP: [none]
UNZIPOPT: [none]
ZIPINFO: [none]
ZIPINFOOPT: [none]

@pgwatson

This comment has been minimized.

Copy link

commented Aug 4, 2017

Interestingly if I point instead to the version 6.00 unzip bundled with Rtools then the devtools::install_github process still fails

The Rtools version of unzip (which doesn’t work) has several different compilation flags set compared to the version from github (which does work)

Compilation flags follow:
Rtools/unzip.exe -v

UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.

Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.

Compiled with Microsoft C 13.10 (Visual C++ 7.1) for
Windows 9x / Windows NT/2K/XP/2K3 (32-bit) on Apr 20 2009.

UnZip special compilation options:
ASM_CRC
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
NTSD_EAS
SET_DIR_ATTRIB
TIMESTAMP
UNIXBACKUP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
UNICODE_SUPPORT [wide-chars] (handle UTF-8 paths)
MBCS-support (multibyte character support, MB_CUR_MAX = 1)
LARGE_FILE_SUPPORT (large files over 2 GiB supported)
ZIP64_SUPPORT (archives using Zip64 for large files supported)
USE_BZIP2 (PKZIP 4.6+, using bzip2 lib version 1.0.5, 10-Dec-2007)
VMS_TEXT_CONV
[decryption, version 2.11 of 05 Jan 2007]

UnZip and ZipInfo environment options:
UNZIP: [none]
UNZIPOPT: [none]
ZIPINFO: [none]
ZIPINFOOPT: [none]

Github/unzip.exe -v

UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.

Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.

Compiled with gcc 4.9.2 for Unix (Cygwin) on Nov 4 2014.

UnZip special compilation options:
ACORN_FTYPE_NFS
ASM_CRC
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
SET_DIR_ATTRIB
SYMLINKS (symbolic links supported, if RTL and file system permit)
TIMESTAMP
UNIXBACKUP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
UNICODE_SUPPORT [wide-chars, char coding: UTF-8] (handle UTF-8 paths)
MBCS-support (multibyte character support, MB_CUR_MAX = 6)
LARGE_FILE_SUPPORT (large files over 2 GiB supported)
ZIP64_SUPPORT (archives using Zip64 for large files supported)
USE_BZIP2 (PKZIP 4.6+, using bzip2 lib version 1.0.6, 6-Sept-2010)
VMS_TEXT_CONV
WILD_STOP_AT_DIR
[decryption, version 2.11 of 05 Jan 2007]

UnZip and ZipInfo environment options:
UNZIP: [none]
UNZIPOPT: [none]
ZIPINFO: [none]
ZIPINFOOPT: [none]

jimhester added a commit to jimhester/remotes that referenced this issue Aug 27, 2018

Use gzip tarballs instead of zip archives when possible
These are generally smaller and should preserve execute permissions in
all cases, whereas some unzip implementations do not do so.

Fixes r-lib/devtools#1799
Fixes r-lib#96

jimhester added a commit to jimhester/remotes that referenced this issue Aug 27, 2018

Use gzip tarballs instead of zip archives when possible
These are generally smaller and should preserve execute permissions in
all cases, whereas some unzip implementations do not do so.

Fixes r-lib/devtools#1799
Fixes r-lib#96

jimhester added a commit to jimhester/remotes that referenced this issue Aug 27, 2018

Use gzip tarballs instead of zip archives when possible
These are generally smaller and should preserve execute permissions in
all cases, whereas some unzip implementations do not do so.

Fixes r-lib/devtools#1799
Fixes r-lib#96

jimhester added a commit to jimhester/remotes that referenced this issue Aug 27, 2018

Use gzip tarballs instead of zip archives when possible
These are generally smaller and should preserve execute permissions in
all cases, whereas some unzip implementations do not do so.

Fixes r-lib/devtools#1799
Fixes r-lib#96

jimhester added a commit that referenced this issue Aug 28, 2018

Use gzip tarballs instead of zip archives when possible
These are generally smaller and should preserve execute permissions in
all cases, whereas some unzip implementations do not do so.

Fixes r-lib/devtools#1799
Fixes #96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.