r - 在 Ubuntu disco 19.04 上安装 R 3.6
问题描述
我有新的 Ubuntu disco 19.04,我按照这里的说明安装了新的 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
已安装版本。
有谁知道如何安装它而无需从源代码编译?
解决方案
我遵循相同的说明,也获得了 R 3.5。在运行之前添加 repo 的 pubkeyapt update
得到了 R 3.6。
这些应该是将 R 3.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 密钥、更新、安装),按照Sébastien Rochette在 thinkr.fr 上的本教程将Ubuntu 更新到 20.* 和 R 到 4.* 作为奖励,它来了带有空间包依赖项的安装提示。
推荐阅读
- java - 我如何分配 i 的值以将其从循环中取出以放入系统中?
- reactjs - 将 webpack-externals 放入 webpack.config.js 后禁用热重载
- reactjs - TypeError:响应不是 Expo SDK 33 中的构造函数
- php - 升级laravel项目时php版本不匹配
- java - 如何在 ListView 中使用 onItemClickListener 获取其他列
- asp.net - 重定向到不同的域,同时保留子域和查询参数,并使用 web.config 强制执行 https
- sparql - 是否所有导入“owl”或“rdf”的本体都实现了“domain”、“range”和其他相关谓词?
- python - 为什么当我将其更改为整数时会浮动
- node.js - 如何从 npm-scripts 获取返回值?
- java - 无法理解使用 0 和 -1 来处理这种类型的返回