Installation of R-package “BH” not possible

2019-01-26 08:51发布

I cannot install the R-package BH which I need only to install dplyr afterwards.

The download works but something is wrong with the processing afterwards, as there is no reaction or progress whatsoever. Installation of lubridate (and deinstallation of lubridate) in contrast worked smoothly without any problems.

My output is:

> install.packages("BH")
Installing package into ‘.../R/win-library/3.2’
(as ‘lib’ is unspecified)
versuche URL 'http://cran.univ-paris1.fr/bin/windows/contrib
/3.2/BH_1.58.0-1.zip'
Content type 'application/zip' length 13846684 bytes (13.2 MB)
downloaded 13.2 MB

and then nothing happens.

Any ideas what could be causing this behavior? Are there any prerequisites for the installation of BH?

> sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252   
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                   
[5] LC_TIME=German_Germany.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base   

2条回答
时光不老,我们不散
2楼-- · 2019-01-26 09:15

I had this problem -- there were two parts to my fix.

1/ Download the windows binary from CRAN and save to the hard disk. You then select the menu item: Packages >> Install package(s) from local files…

2/ Edit the utils:::unpackPkgZip function to increase the sleep time – so that my virus checker has time to scan it. To implement this, do the following:

trace(utils:::unpackPkgZip, edit=TRUE)

Look for the line Sys.sleep(0.5), toward the bottom of the body of the function; it's a big package so I went for Sys.sleep(10).

If you are still seeing the error: Warning: unable to move temporary installation, try a longer sleep period.

Note that you won't see the edit if you check utils:::unpackPkgZip; that is the unedited version, and it can be restored via untrace(utils:::unpackPkgZip).

So see the edited version, use body(utils:::unpackPkgZip).

查看更多
欢心
3楼-- · 2019-01-26 09:37

BH, as a sizeable subset of Boost Headers is big, as in really big:

edd@max:~$ du -csm /usr/local/lib/R/site-library/BH/
111     /usr/local/lib/R/site-library/BH/
111     total
edd@max:~$ 

That is 111 megabytes.

You may simply have run our of patience if your Windows (network share ?) was slow in writing the files.

BH is also widely used by other CRAN packages, and there has not been a package on any of the platforms used by CRAN.

So I suggest you maybe place your R package library onto a local hard drive...

If you have an actual bug report, please consider filing an issue ticket against our BH package.

查看更多
登录 后发表回答