简体   繁体   English

无法安装 R 包“BH”

[英]Installation of R-package "BH" not possible

I cannot install the R-package BH which I need only to install dplyr afterwards.我无法安装R-package BH ,之后我只需要安装 dplyr。

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.相比之下,lubridate 的安装(和 lubridate 的卸载)运行顺利,没有任何问题。

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?安装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   

BH, as a sizeable subset of B oost H eaders is big, as in really big: BH,作为B oost H头的一个相当大的子集是很大的,就像真的很大一样:

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.那是 111 兆字节。

You may simply have run our of patience if your Windows (network share ?) was slow in writing the files.如果您的 Windows(网络共享?)写入文件很慢,您可能只是耐心等待。

BH is also widely used by other CRAN packages, and there has not been a package on any of the platforms used by CRAN. BH 也被其他 CRAN 包广泛使用,在 CRAN 使用的任何平台上都没有一个包。

So I suggest you maybe place your R package library onto a local hard drive...所以我建议你把你的 R 包库放到本地硬盘上......

If you have an actual bug report, please consider filing an issue ticket against our BH package.如果您有实际的错误报告,请考虑针对我们的 BH 包提交问题单。

I had this problem -- there were two parts to my fix.我遇到了这个问题——我的修复有两个部分。

1/ Download the windows binary from CRAN and save to the hard disk. 1/ 从 CRAN 下载 windows 二进制文件并保存到硬盘。 You then select the menu item: Packages >> Install package(s) from local files…然后选择菜单项: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. 2/ 编辑 utils:::unpackPkgZip 函数以增加睡眠时间——这样我的病毒检查器就有时间扫描它。 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;在函数体的底部寻找Sys.sleep(0.5)行; it's a big package so I went for Sys.sleep(10) .这是一个大包,所以我选择了Sys.sleep(10)

If you are still seeing the error: Warning: unable to move temporary installation , try a longer sleep period.如果您仍然看到错误: Warning: unable to move temporary installation ,请尝试更长的睡眠时间。

Note that you won't see the edit if you check utils:::unpackPkgZip ;请注意,如果您检查utils:::unpackPkgZip ,您将不会看到编辑; that is the unedited version, and it can be restored via untrace(utils:::unpackPkgZip) .这是未编辑的版本,可以通过untrace(utils:::unpackPkgZip)恢复。

So see the edited version, use body(utils:::unpackPkgZip) .所以查看编辑后的版本,使用body(utils:::unpackPkgZip)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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