R 3.6 上的 debian 拉伸(stretch)

标签 r debian-stretch

这个问题在这里已经有了答案:





R: Cannot install rJava; what is r-api-3.4?

(1 个回答)


2年前关闭。




我需要在 debian 拉伸(stretch)上运行 3.6 - 我按照这里的说明进行操作:

https://cran.r-project.org/bin/linux/debian/

并使用了这个 repo :

http://lib.stat.cmu.edu/R/CRAN/bin/linux/debian拉伸(stretch)起重机35/

我能够安装它。但是我需要 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.

有没有办法为我的环境获取这两个包?

最佳答案

我不确定这是否能解决您的问题。

sudo dpkg --configure -a

在这些情况下,我发现使用 aptitude 更容易
sudo apt install aptitude    
sudo aptitude install r-cran-ggplot2

当然,如果 ggplot2 有效,您可以尝试使用 caret 进行相同的操作。

然而,一个问题是,如果您在终端中加载 R 并尝试在 R 中安装这些软件包,您会收到什么样的错误消息(如果有的话)?

在终端中键入 R 并在加载类型后
install.packages("ggplot2",dependencies=TRUE)

执行此操作时会收到哪些错误消息?

另一个常见问题是您尝试安装的软件包版本确实安装在您正在使用的 R 版本中。在这种情况下,您必须从 cran 下载软件包,解压缩并从本地文件安装。

打开一个终端并输入 R 然后在 session 类型中
packageurl <- "https://cran.r-project.org/src/contrib/ggplot2_3.2.0.tar.gz"
install.packages(packageurl, repos=NULL, type="source", dependencies=TRUE)

如果您有版本控制的常见问题,希望此命令不会打扰检查 ggplot 的版本和 R 的版本。

或者,如果您不想在终端中显式启动 R session 类型
wget https://cran.r-project.org/src/contrib/ggplot2_3.2.0.tar.gz
R CMD INSTALL ggplot2_3.2.0.tar.gz repos=NULL type="source" dependencies=TRUE

关于R 3.6 上的 debian 拉伸(stretch),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57313262/

相关文章:

linux - 如何在 Debian Stretch 的代码中粗暴地中断远程网络连接

r - 是否可以在 "within(...)"结构内循环?

r - RStudio中空工作区/环境的键盘快捷键

rbind.data.frame的性能

python - Tensorflow:AttributeError: 'NoneType'对象没有属性 'original_name_scope'

linux - 无法在 Debian Stretch 上安装 update-notifier-common

php - docker debian 拉伸(stretch)镜像中缺少 php-redis 存储库

r - 在 R 中使用 PCA 比较相异性度量

r - A 列按 B 列分组的组间(组间)组合

php - apache2 不在 Debian Stretch 上执行 php 脚本