0

我正在尝试通过 docker 和 shinyproxy 部署应用程序。我正在使用shinyproxy-template和我已修改的标准 Dockerfile,如下所示:

RUN apt-get update && apt-get install -y --no-install-recommends \
    r-cran-rcpp \
    r-cran-shiny \
    r-cran-testthat

我使用这种方法是因为我的虚拟机太弱,无法在构建镜像时编译 RCPP,正如 Repo 中提供的 Dockerfile 所建议的那样。该方法最初源于此问题此处的答案

然而,在构建图像时:

sudo docker build -t openanalytics/shinyproxy-template .

我收到一个错误:

Step 5/12 : RUN apt-get update && apt-get install -y
--no-install-recommends     r-cran-rcpp     r-cran-shiny     r-cran-testthat  ---> Running in 83c71b91f408 Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB] Hit:2 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ InRelease Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] Get:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB] Fetched 324 kB in 1s (441 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies:  r-cran-rcpp : Depends: r-api-3.5
               Depends: r-cran-pkgkitten but it is not going to be installed  r-cran-shiny : Depends: r-api-3.5
                Depends: r-cran-httpuv (>= 1.5.2) but it is not going to be installed
                Depends: r-cran-mime (>= 0.3) but it is not going to be installed
                Depends: r-cran-jsonlite (>= 0.9.16) but it is not going to be installed
                Depends: r-cran-xtable but it is not going to be installed
                Depends: r-cran-digest but it is not going to be installed
                Depends: r-cran-htmltools (>= 0.4.0) but it is not going to be installed
                Depends: r-cran-r6 (>= 2.0) but it is not going to be installed
                Depends: r-cran-sourcetools but it is not going to be installed
                Depends: r-cran-later (>= 1.0.0) but it is not going to be installed
                Depends: r-cran-promises (>= 1.1.0) but it is not going to be installed
                Depends: r-cran-crayon but it is not going to be installed
                Depends: r-cran-rlang (>= 0.4.0) but it is not going to be installed
                Depends: r-cran-fastmap (>= 1.0.0) but it is not going to be installed  r-cran-testthat : Depends: r-api-3.5
                   Depends: r-cran-cli but it is not going to be installed
                   Depends: r-cran-crayon (>= 1.3.4) but it is not going to be installed
                   Depends: r-cran-digest but it is not going to be installed
                   Depends: r-cran-ellipsis but it is not going to be installed
                   Depends: r-cran-evaluate but it is not going to be installed
                   Depends: r-cran-magrittr but it is not going to be installed
                   Depends: r-cran-pkgload but it is not going to be installed
                   Depends: r-cran-praise but it is not going to be installed
                   Depends: r-cran-r6 (>= 2.2.0) but it is not going to be installed
                   Depends: r-cran-rlang (>= 0.4.1) but it is not going to be installed
                   Depends: r-cran-withr (>= 2.0.0) but it is not going to be installed E: Unable to correct problems, you have held broken packages. The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends     r-cran-rcpp     r-cran-shiny    r-cran-testthat' returned a non-zero code: 100

我非常感谢有关如何调试此问题的任何提示!

一个快速附录:当我在控制台中运行 install-command 时,它运行良好:

 sudo apt-get install r-cran-rcpp
Reading package lists... Done
Building dependency tree
Reading state information... Done
r-cran-rcpp is already the newest version (1.0.3-1build1).
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
4

0 回答 0