更新R base - Ubuntu从3.4.4到3.5.2 - Azure

问题描述 投票:2回答:3

我在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

所以我做了一些研究,并在biostars.org上找到了这个post

其中一篇帖子说以下代码可能有效

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基础?

r azure ubuntu installation
3个回答
1
投票

尝试了一些其他方法,以下似乎工作:

sudo apt-get install r-base-core=3.5.2-1xenial

参考:1。Install particular version(2.15.2) of r-base on ubuntu 2. https://cran.rstudio.com/bin/linux/ubuntu/xenial-cran35/

但我不确定这是否也适用于其他人,因为我无法重现它。


1
投票

对我有用的是添加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。


0
投票

apt-get update 

apt-get dist-upgrade

首先要“向前移动你的装置”。这包括升级已安装的软件包。它应该只升级你的R安装(除非你也切换/需要切换存储库)。

r-sig-debian列表是好的和耐心的基本'如何在Debian / Ubuntu上为R做R'。考虑订阅潜伏和/或提问。

© www.soinside.com 2019 - 2024. All rights reserved.