eddelbuettel / bh

R package providing Boost Header files
85 stars 33 forks source link

Issues installing the BH package #54

Closed walkenhorst closed 6 years ago

walkenhorst commented 6 years ago

When I try to install the BH package in R version 3.4.2, I get the following errors: ``

install.packages("BH") Installing package into ‘C:/NotBackedUp/software/R/3.4’ (as ‘lib’ is unspecified) trying URL 'https://mirror.aarnet.edu.au/pub/CRAN/bin/windows/contrib/3.4/BH_1.66.0-1.zip' Content type 'application/zip' length 17880018 bytes (17.1 MB) downloaded 16.9 MB Warning in install.packages : downloaded length 17682432 != reported length 17880018 Warning in install.packages : error 1 in extracting from zip file Warning in install.packages : cannot open compressed file 'BH/DESCRIPTION', probable reason 'No such file or directory' Error in install.packages : cannot open the connection

Or if I try to download and then install it as a tar.gz file: ``

package.name = "BH" download.path = "C:/NotBackedUp/Temp" pfname = download.packages(package.name, download.path) trying URL 'https://mirror.aarnet.edu.au/pub/CRAN/src/contrib/BH_1.66.0-1.tar.gz' Content type 'application/x-gzip' length 11583445 bytes (11.0 MB) downloaded 10.9 MB Warning message: In download.file(url, destfile, method, mode = "wb", ...) : downloaded length 11427840 != reported length 11583445 install.packages(repos=NULL, pkgs=pfname[2]) Installing package into ‘C:/NotBackedUp/software/R/3.4’ (as ‘lib’ is unspecified) '\svrau100qsm01.oceania.corp.anz.com\PFSMB PBWMg\Deposits\Cash&TDs\Data Science\Reporting\TDs\Tasks' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. Error in untar2(tarfile, files, list, exdir, restore_times) : incomplete block on file Warning in install.packages : running command '"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l "C:\NotBackedUp\software\R\3.4" "C:/NotBackedUp/Temp/BH_1.66.0-1.tar.gz"' had status 1 Warning in install.packages : installation of package ‘C:/NotBackedUp/Temp/BH_1.66.0-1.tar.gz’ had non-zero exit status

Or if I try to download and install it as a windows binary file: ``

package.name = "BH" download.path = "C:/NotBackedUp/Temp" pfname = download.packages(package.name, download.path, type="win.binary") trying URL 'https://mirror.aarnet.edu.au/pub/CRAN/bin/windows/contrib/3.4/BH_1.66.0-1.zip' Content type 'application/zip' length 17880018 bytes (17.1 MB) downloaded 16.9 MB Warning message: In download.file(url, destfile, method, mode = "wb", ...) : downloaded length 17743872 != reported length 17880018 install.packages(repos=NULL, pkgs=pfname[2]) Installing package into ‘C:/NotBackedUp/software/R/3.4’ (as ‘lib’ is unspecified) Warning in install.packages : error 1 in extracting from zip file Warning in install.packages : cannot open compressed file 'BH/DESCRIPTION', probable reason 'No such file or directory' Error in install.packages : cannot open the connection

I've tried the following 2 repositories and get the same error: Global (CDN) - RStudio https://cran.rstudio.com/src/contrib/BH_1.66.0-1.tar.gz Australia (Melbourne 1) [https] - AARNET https://mirror.aarnet.edu.au/pub/CRAN/bin/windows/contrib/3.4/BH_1.66.0-1.zip

eddelbuettel commented 6 years ago

It may be your mirror or your local networking. There are a number of packages which depend on BH, and they frequently get rebuilt by users, on Travis CI or of course on CRAN. There is no actual issue.

Quick check:

edd@rob:/tmp$ wget --quiet https://cloud.r-project.org/src/contrib/BH_1.66.0-1.tar.gz
edd@rob:/tmp$ tar taf BH_1.66.0-1.tar.gz | head
BH/
BH/inst/
BH/inst/NEWS.Rd
BH/inst/include/
BH/inst/include/boost/
BH/inst/include/boost/rational.hpp
BH/inst/include/boost/numeric/
BH/inst/include/boost/numeric/odeint/
BH/inst/include/boost/numeric/odeint/config.hpp
BH/inst/include/boost/numeric/odeint/iterator/
edd@rob:/tmp$ md5sum BH_1.66.0-1.tar.gz 
534bb3a301293d3a0880b8eb63115467  BH_1.66.0-1.tar.gz
edd@rob:/tmp$ 
edd@rob:/tmp$ wget --quiet https://cloud.r-project.org/bin/windows/contrib/3.4/BH_1.66.0-1.zip
edd@rob:/tmp$ unzip -l BH_1.66.0-1.zip | head
Archive:  BH_1.66.0-1.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2018-02-17 18:23   BH/
     1585  2018-02-17 18:22   BH/DESCRIPTION
        0  2018-02-17 18:23   BH/help/
       79  2018-02-17 18:23   BH/help/aliases.rds
       38  2018-02-17 18:23   BH/help/AnIndex
     3980  2018-02-17 18:23   BH/help/BH.rdb
      181  2018-02-17 18:23   BH/help/BH.rdx
edd@rob:/tmp$ md5sum BH_1.66.0-1.zip 
801eb16088b6e40a7d7dad588ceca7f9  BH_1.66.0-1.zip
edd@rob:/tmp$ 
edd@rob:/tmp$ 
walkenhorst commented 6 years ago

Yes, appears to be a network issue, when I disconnect from my work vpn (I'm working remotely) and connect directly to the internet and download the package, I have been able to install it manually (download first and then install from local file). Apologoes for the false alarm and thanks for your advice!