在 Elementary OS 5.0 Juno 中安装 R 和 R studio 时遇到问题

在 Elementary OS 5.0 Juno 中安装 R 和 R studio 时遇到问题

我正在尝试在 Elementary OS 5.0 Juno 上安装 R 和 R Studio。在尝试了几种安装方法并尝试删除以前的软件包并开始全新安装后,我仍然收到以下错误,有人可以告诉我下一步该怎么做吗?

$ sudo apt-get install r-base r-base-dev
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-base : Depends: r-base-core (>= 3.6.1-3disco) but it is not going to be installed
          Depends: r-recommended (= 3.6.1-3disco) but it is not going to be installed
          Recommends: r-base-html but it is not going to be installed
 r-base-dev : Depends: r-base-core (>= 3.6.1-3disco) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

答案1

您使用的是 eOS Juno,它基于 Ubuntu 18.04 Bionic。我在错误中看到您尝试使用 Disco 版本,即 Ubuntu 19.xx。因此,请使用正确的版本。

如果你没有使用过不同的软件包,也许你应该尝试一下 Anaconda。在那里你也可以安装 R 和 RStudio,该工具会为你选择正确的版本。

仅供您参考: 如何在 Anaconda 中创建 R 环境

相关内容