r - 将 R 基础 - Ubuntu 从 3.4.4 更新到 3.5.2 - Azure

标签 r azure ubuntu installation

我在 Azure Linux 虚拟机上使用 Ubuntu 16.04

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:        16.04
Codename:       xenial

Rstudio/Rserver 当前的 R 版本是 3.4.4,我想将其更新到最新版本(即版本 3.5.2)

R --version
R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

由于某些原因,最常见的方法不起作用:

apt-get update
apt-get upgrade

所以我做了一些研究并发现了这个 post在biostars.org上

其中一篇文章说以下代码可能有效

sudo su 
echo "deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/" >> /etc/apt/sources.list 
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 
apt-get update 
apt-get install r-base 
apt-get install r-base-dev

但是,在 apt-get install r-base 之后,我收到以下错误消息:

root@VMforR:/usr/local/bin# apt-get 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-recommended (= 3.5.2-1xenial) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我不明白“持有损坏的包”是什么意思,更重要的是,如何更新 R 库?

最佳答案

对我有用的是添加 Michael Rutter 的 PPA:

sudo add-apt-repository ppa:marutter/rrutter3.5
sudo apt-get update

更新R:

sudo apt install r-api-3.5

我使用的是 16.04 LTS ubuntu。

关于r - 将 R 基础 - Ubuntu 从 3.4.4 更新到 3.5.2 - Azure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54068089/

相关文章:

r - 将比例尺添加到已使用 coord_sf 缩放的 ggplot map ?

rest - 交付和使用 Azure REST-API SharedKey 进行 Blob 上传

sql - Sync Framework 2.1 首次同步花费太多时间

azure - 未更改的 Azure 数据流在流表达式上显示验证错误

python - 当 VLC 媒体进程每次在 Ubuntu 上启动时如何自动调用 Python 脚本?

ubuntu - apt-get 无法获取 403 禁止

R:使用数据框列名称作为向量名称

r - 如何使用 R 中的 Openxlsx 包修改 Excel 工作簿中的现有工作表?

regex - 当 [ :punct:] is too much

linux - 如何仅向某些用户授予对子文件夹的权限