在UbuntuDisco 19.04上安装R3.6

在UbuntuDisco 19.04上安装R3.6,r,R,我有新的UbuntuDisco 19.04,我按照说明安装了新的R3.6 但是,在安装密钥并通过以下方式添加存储库之后: sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu disco-cran35/' 和运行: sudo apt update sudo apt install r-base 我得到: Reading package lists... Done Building dependenc

我有新的UbuntuDisco 19.04,我按照说明安装了新的R3.6

但是,在安装密钥并通过以下方式添加存储库之后:

sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu disco-cran35/'
和运行:

sudo apt update
sudo apt install r-base
我得到:

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.0-1cosmic) but 3.5.2-1build1 is to be installed
          Depends: r-recommended (= 3.6.0-1cosmic) but 3.5.2-1build1 is to be installed
E: Unable to correct problems, you have held broken packages.
我可以通过安装R

sudo apt install r-base
在添加上述存储库之前,但安装了版本
3.5.2

有人知道如何在不必从源代码编译的情况下安装它吗?

我也遵循了,获得了R3.5。 在运行
apt update
之前添加repo的公开密钥使我得到了r3.6

以下是将R3.6安装到新的Ubuntu 19.04中的步骤:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu disco-cran35/'
sudo apt update
sudo apt install r-base-dev
更改存储库详细信息可以安装到其他Ubuntu版本上,即将Ubuntu 16.04的“disco”替换为“xenial”

更新2020年10月:以同样的方式(添加repo,添加repo密钥,更新,安装),然后将Ubuntu更新为20.*并将R更新为4*
作为奖励,它附带了空间软件包依赖项的安装提示。

感谢@matt paul的编辑!请注意,上述解决方案是在Ubuntu 19下测试的;04(disco),因此在其他Ubuntu版本上可能会遇到不同的R可用性。感谢@user2867078指出R-base也将提供R3.6。安装r-base-dev提供了许多用户需要的附加软件包。通过将“迪斯科”更改为“仿生”,可用于18 LTS!我得到
W:GPG错误:https://cloud.r-project.org/bin/linux/ubuntu disco-cran35/INRELASE:无法验证以下签名,因为公钥不可用:NO_PUBKEY 51716619E084DAB9 E:存储库的https://cloud.r-project.org/bin/linux/ubuntu disco-cran35/INRELASE'未签名。
@sam我能复制的最佳版本删除GPG密钥,然后添加回购后出现“NO_PUBKEY”错误。我认为你的选择是:*忽略错误,继续剩下的三行(添加回购、apt更新、安装R)。*首先添加pubkey,然后添加repo。我还修改了答案中的代码,首先添加pubkey,然后添加repo。