【发布时间】:2019-01-07 03:01:53
【问题描述】:
我在 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