首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >remotes包不能在慢带宽下install_github公共github包

remotes包不能在慢带宽下install_github公共github包
EN

Stack Overflow用户
提问于 2022-03-14 11:14:10
回答 2查看 304关注 0票数 3

我正在努力安装一个公共R包(140 to )在码头映像构建与一个摇滚/TidyVerse基础映像。

我能够在快速的互联网连接(200 4Mbps )上建立图像,但在4 4Mbps上挣扎

代码语言:javascript
复制
#11 687.2 The downloaded source packages are in
#11 687.2       ‘/tmp/Rtmpol4fiC/downloaded_packages’
#11 688.9 Downloading GitHub repo asgr/ProSpect@master
#11 748.8 Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
#11 748.8   download from 'https://api.github.com/repos/asgr/ProSpect/tarball/master' failed
#11 749.1 Skipping install of 'Rfits' from a github remote, the SHA1 (7050c11a) has not changed since last install.
#11 749.1   Use `force = TRUE` to force installation
#11 749.4 Skipping install of 'ProFit' from a github remote, the SHA1 (3ad5fa18) has not changed since last install.
#11 749.4   Use `force = TRUE` to force installation
#11 749.7 * checking for file ‘/tmp/Rtmpol4fiC/remotes6494ed363/kateharborne-SimSpin-857278e/DESCRIPTION’ ... OK
#11 749.8 * preparing ‘SimSpin’:
#11 749.8 * checking DESCRIPTION meta-information ... OK
#11 749.8 * cleaning src
#11 749.9 * installing the package to process help pages
#11 750.3       -----------------------------------
#11 750.3 ERROR: dependency ‘ProSpect’ is not available for package ‘SimSpin’
#11 750.3 * removing ‘/tmp/RtmpUvUFDh/Rinsta8b47db6258/SimSpin’
#11 750.3       -----------------------------------
#11 750.3 ERROR: package installation failed
#11 750.5 Error: Failed to install 'SimSpin' from GitHub:
#11 750.5   System command 'R' failed, exit status: 1, stdout & stderr were printed
#11 750.5 Execution halted

我尝试增加超时,指定下载方法(libcurl),首先安装违规包(ProSpect),但没有效果。有没有人看到类似的东西或有任何建议?在从github下载较慢带宽的remotes (和devtools)中,这是一个一致的问题。

代码语言:javascript
复制
# Dockerfile for R-based software (SimSpin)
#FROM rocker/r-ver:4.1.2
FROM rocker/tidyverse:4.0.2

RUN apt-get -y update && apt-get install -y xml2 openssl libhdf5-dev libfftw3-dev curl

RUN R -e 'install.packages("remotes")'
RUN R -e 'options(timeout=9999999)'
RUN R -e 'options(download.file.method = "libcurl")'
RUN R -e 'Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS="true")'
RUN R -e 'remotes::install_github("asgr/ProSpect", ref="master")'
RUN R -e 'remotes::install_github("kateharborne/SimSpin", ref="master")'

更新--我已经把它缩小到了remotes:install_github在慢连接上的问题(4 4Mbps下载)。我不知道该怎么配置才能绕过这个..。(如果我在40Mbps+上运行相同的安装,它就不会安装问题,但是我不能一直访问该带宽)。

代码语言:javascript
复制
> remotes::install_github("kateharborne/SimSpin", ref="master")
Downloading GitHub repo kateharborne/SimSpin@master
Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
  download from 'https://api.github.com/repos/kateharborne/SimSpin/tarball/master' failed
EN

回答 2

Stack Overflow用户

发布于 2022-05-24 13:41:54

如果您没有使用install_github,而是克隆了回购a la:

代码语言:javascript
复制
git clone https://github.com/kateharborne/SimSpin
cd SimSpin

然后用

代码语言:javascript
复制
devtools::install()

另一个选项是为download.file设置超时选项,如下所示:

代码语言:javascript
复制
options(timeout=1000)
票数 3
EN

Stack Overflow用户

发布于 2022-11-15 22:07:33

我认为您也必须安装httr :我认为remotes使用httr,但是不管出于什么原因,都不会在依赖项中安装它。

代码语言:javascript
复制
FROM rocker/tidyverse:4.0.2

RUN apt-get -y update && apt-get install -y xml2 openssl libhdf5-dev libfftw3-dev curl
RUN R -e 'install.packages("httr")'
RUN R -e 'install.packages("remotes")'
RUN R -e 'options(timeout=9999999)'
RUN R -e 'options(download.file.method = "libcurl")'
RUN R -e 'Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS="true")'
RUN R -e 'remotes::install_github("asgr/ProSpect", ref="master")'
RUN R -e 'remotes::install_github("kateharborne/SimSpin", ref="master")'
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71466840

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档