Failure to install package with devtools (Windows): conflict with tar.exe?

Hi! I ran into an error when I run devtools::install_github("coatless/ucidata"). My platform is Windows 10 and I have installed Rtools 3.5. I installed the 'devtools' package successfully, but was unable to use it to install things. It seems to be an issue with Rtools. The error message is shown as below. Does anyone know its course? Thanks!

> devtools::install_github("coatless/ucidata")
Downloading GitHub repo coatless/ucidata@master
tar.exe: Archive entry has empty or unreadable filename ... skipping.
(more of this message)
tar.exe: Archive entry has empty or unreadable filename ... skipping.
tar.exe: Error exit delayed from previous errors.
Error: Failed to install 'ucidata' from GitHub:
  Does not appear to be an R package (no DESCRIPTION)
In addition: Warning messages:
1: In utils::untar(tarfile, ...) :
  β€˜tar.exe -xf "C:\Users\[username]\AppData\Local\Temp\RtmpEJ1upa\file2efc4c405cfb.tar.gz" -C "C:/Users/[username]/AppData/Local/Temp/RtmpEJ1upa/remotes2efc27bc4b43"’ returned error code 1
2: In system(cmd, intern = TRUE) :
  running command 'tar.exe -tf "C:\Users\[username]\AppData\Local\Temp\RtmpEJ1upa\file2efc4c405cfb.tar.gz"' had status 1

Hi @tea! Welcome!

I wonder if something happened to interrupt or corrupt the initial download? The error messages look like maybe there's something wrong with the tarball. Have you tried running it again (maybe even from a different internet connection)?

Here's the output I get:

> devtools::install_github("coatless/ucidata")
Downloading GitHub repo coatless/ucidata@master
βœ”  checking for file β€˜/tmp/RtmpMoTJWK/remotes34a35bf9f43/coatless-ucidata-ac5f9d1/DESCRIPTION’ ...
─  preparing β€˜ucidata’:
βœ”  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a β€˜data/datalist’ file should be added
─  building β€˜ucidata_0.0.3.tar.gz’
   
Installing package into β€˜/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6’
(as β€˜lib’ is unspecified)
* installing *source* package β€˜ucidata’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (ucidata)
Session Info
#> ─ Session info ──────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 3.6.0 (2019-04-26)
#>  os       Ubuntu 16.04.6 LTS          
#>  system   x86_64, linux-gnu           
#>  ui       X11                         
#>  language (EN)                        
#>  collate  C.UTF-8                     
#>  ctype    C.UTF-8                     
#>  tz       Etc/UTC                     
#>  date     2019-09-12                  
#> 
#> ─ Packages ──────────────────────────────────────────────────────────────
#>  package     * version date       lib source        
#>  assertthat    0.2.1   2019-03-21 [1] RSPM (R 3.6.0)
#>  backports     1.1.4   2019-04-10 [1] RSPM (R 3.6.0)
#>  callr         3.3.1   2019-07-18 [1] RSPM (R 3.6.0)
#>  cli           1.1.0   2019-03-19 [1] RSPM (R 3.6.0)
#>  crayon        1.3.4   2017-09-16 [1] RSPM (R 3.6.0)
#>  curl          4.0     2019-07-22 [1] RSPM (R 3.6.0)
#>  desc          1.2.0   2018-05-01 [1] RSPM (R 3.6.0)
#>  devtools      2.2.0   2019-09-07 [1] RSPM (R 3.6.0)
#>  digest        0.6.20  2019-07-04 [1] RSPM (R 3.6.0)
#>  DT            0.8     2019-08-07 [1] RSPM (R 3.6.0)
#>  ellipsis      0.2.0.1 2019-07-02 [1] RSPM (R 3.6.0)
#>  evaluate      0.14    2019-05-28 [1] RSPM (R 3.6.0)
#>  fs            1.3.1   2019-05-06 [1] RSPM (R 3.6.0)
#>  glue          1.3.1   2019-03-12 [1] RSPM (R 3.6.0)
#>  highr         0.8     2019-03-20 [1] RSPM (R 3.6.0)
#>  htmltools     0.3.6   2017-04-28 [1] RSPM (R 3.6.0)
#>  htmlwidgets   1.3     2018-09-30 [1] RSPM (R 3.6.0)
#>  knitr         1.23    2019-05-18 [1] RSPM (R 3.6.0)
#>  magrittr      1.5     2014-11-22 [1] RSPM (R 3.6.0)
#>  memoise       1.1.0   2017-04-21 [1] RSPM (R 3.6.0)
#>  pkgbuild      1.0.5   2019-08-26 [1] RSPM (R 3.6.0)
#>  pkgload       1.0.2   2018-10-29 [1] RSPM (R 3.6.0)
#>  prettyunits   1.0.2   2015-07-13 [1] RSPM (R 3.6.0)
#>  processx      3.4.1   2019-07-18 [1] RSPM (R 3.6.0)
#>  ps            1.3.0   2018-12-21 [1] RSPM (R 3.6.0)
#>  R6            2.4.0   2019-02-14 [1] RSPM (R 3.6.0)
#>  Rcpp          1.0.1   2019-03-17 [1] RSPM (R 3.6.0)
#>  remotes       2.1.0   2019-06-24 [1] RSPM (R 3.6.0)
#>  rlang         0.4.0   2019-06-25 [1] RSPM (R 3.6.0)
#>  rmarkdown     1.14    2019-07-12 [1] RSPM (R 3.6.0)
#>  rprojroot     1.3-2   2018-01-03 [1] RSPM (R 3.6.0)
#>  sessioninfo   1.1.1   2018-11-05 [1] RSPM (R 3.6.0)
#>  stringi       1.4.3   2019-03-12 [1] RSPM (R 3.6.0)
#>  stringr       1.4.0   2019-02-10 [1] RSPM (R 3.6.0)
#>  testthat      2.2.1   2019-07-25 [1] RSPM (R 3.6.0)
#>  usethis       1.5.1   2019-07-04 [1] RSPM (R 3.6.0)
#>  withr         2.1.2   2018-03-15 [1] RSPM (R 3.6.0)
#>  xfun          0.8     2019-06-25 [1] RSPM (R 3.6.0)
#>  yaml          2.2.0   2018-07-25 [1] RSPM (R 3.6.0)
#> 
#> [1] /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6
#> [2] /opt/R/3.6.0/lib/R/library

Thank you! I tried running it from 3 different internet connections, but it doen't help. I guess there could be something wrong with the "untar" process in my environment.

I found there is a built-in "tar" command in Windows cmd, and seemingly it will mask the "tar" in Rtools. It may be this one that failed to untar the downloaded content.

When type "tar" in the cmd on my Win laptop, the message shown is different from what the GNU "tar" shows.

tar.exe: Must specify one of -c, -r, -t, -u, -x

I am wondering if anyone with a Windows 10 device found similar errors before?

1 Like