在Ubuntu Disco 19.04上安装R 3.6

时间:2019-04-30 23:11:01

标签: r

我有新的Ubuntu迪斯科19.04,并且按照说明here安装新的R 3.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

有人知道如何安装而不需要从源代码进行编译吗?

1 个答案:

答案 0 :(得分:1)

我跟随same instructions,也获得了R 3.5。 在运行apt update之前添加回购协议的pubkey使我获得R 3.6。

这些应该是将R 3.6安装到全新的Ubuntu 19.04中的步骤:

sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu disco-cran35/'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt update
sudo apt install r-base-dev