【发布时间】:2019-12-10 07:14:04
【问题描述】:
我需要在 debian stretch 上运行 3.6 - 我按照此处的说明进行操作:
https://cran.r-project.org/bin/linux/debian/
并使用了这个 repo:
http://lib.stat.cmu.edu/R/CRAN/bin/linux/debianstretch-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.
有没有办法为我的环境获取这两个包?
【问题讨论】:
-
请提供您在 R 中输入 install.packages("ggplot2") 时收到的错误消息
-
我没有使用 R 会话。我正在使用 rpy 从 python 调用 R,所以我需要在 OS 级别可用的包。
-
虽然我没有使用 rpy 的经验,但我怀疑您在这里遇到了一个常见问题,即包依赖于您正在使用的 R 版本。如果是这种情况,将通过 R 错误消息进行澄清。
-
请参阅stackoverflow.com/questions/51256462。您需要从 CRAN 安装这些软件包。
-
在 R 会话中安装包没有错误。
标签: r debian-stretch