[英]How to install in a docker container an old version of a r package
如何在 docker 容器中安装 ggplot2 2.2.1?
命令行
RUN R -e "install.packages('devtools', repos='http://cran.rstudio.com/')"
RUN R -e "devtools::install_github('http://github.com/tidyverse/ggplot2/archive/v2.2.1.tar.gz')"
在 Dockerfile 中给了我错误:
The command '/bin/sh -c R -r "devtools::install_github('https://github.com/tidyverse/ggplot2/archive/v2.2.1.tar.gz')"' returned a non-zero code: 2
如果我删除该行
RUN R -e "devtools::install_github('http://github.com/tidyverse/ggplot2
没有错误出现。 我还尝试了不同的方法来安装 ggplot2 2.2.1,但都导致了相同的结果/错误。
我通过更改命令解决了问题
RUN R -e "install.packages('devtools', repos='http://cran.rstudio.com/', dependencies = TRUE)"
现在 devtools 安装适当。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.