我需要在debian Stretch上运行3.6-我按照此处的说明进行操作:
https://cran.r-project.org/bin/linux/debian/
并使用了这个仓库:
http://lib.stat.cmu.edu/R/CRAN/bin/linux/debian Stretch-cran35 /
我能够安装它。但是我需要的2个软件包r-cran-caret和r-cran-ggplot2无法安装:
# apt-get install r-cran-ggplot2
Reading package lists... Done
Building dependency tree
Reading state information... Done
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-ggplot2 : Depends: r-api-3
Depends: r-cran-digest but it is not going to be installed
Depends: r-cran-gtable (>= 0.1.1) but it is not
going to be installed
Depends: r-cran-plyr (>= 1.7.1) but it is not going
to be installed
Depends: r-cran-reshape2 but it is not going to be installed
Depends: r-cran-scales (>= 0.4.1) but it is not
going to be installed
Depends: r-cran-tibble but it is not going to be installed
Depends: r-cran-lazyeval but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
有没有办法为我的环境获取这两个软件包?
您缺少依赖项,并且 apt-get 告诉您这些依赖项已损坏。您需要从 R 库中删除损坏的依赖项,该库应该位于/usr/lib/R/site-library.
为什么不直接在 R 中安装它呢?
install.packages(c("caret", "ggplot2"), dependencies = TRUE)
Run Code Online (Sandbox Code Playgroud)
正如您所提到的,您想使用 docker:请参阅littlerDirk Eddelbuettel 的软件包:https://github.com/eddelbuettel/littler特别install2.r是功能及其选项-d
有关其他人如何使用它的示例,请参阅rockerdocker 镜像。
另一个编辑:如果您决定使用更少的内容,我认为您将需要这种语法
install2.r -d TRUE caret ggplot2
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
275 次 |
| 最近记录: |