【问题标题】:Update R base - Ubuntu from 3.4.4 to 3.5.2 - Azure更新 R 基础 - Ubuntu 从 3.4.4 到 3.5.2 - Azure
【发布时间】: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


    【解决方案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。

    【讨论】:

      【解决方案2】:

      尝试了其他一些方法,以下似乎可行:

      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/

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

      【讨论】:

        【解决方案3】:

        之后

        apt-get update 
        

        apt-get dist-upgrade
        

        首先要“向前推进您的安装”。这包括升级已安装的软件包。它应该只升级您的 R 安装(除非您还切换/需要切换存储库)。

        r-sig-debian 列表很好,并且对基本的“如何在 Debian/Ubuntu 上使用 X for R 进行操作”很有耐心。考虑订阅潜伏和/或提问。

        【讨论】:

          【解决方案4】:

          我说我的一些包裹丢失了。所以,我运行了sudo dpkg --configure -a,然后重新运行了R --update,它可以纠正丢失的包错误。

          【讨论】:

          • 您的包裹是否破损?这似乎没有回答 OP 的问题,即保存损坏的软件包以及如何使用这些损坏的软件包进行更新。
          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2017-11-27
          • 2021-08-16
          • 2020-05-07
          • 1970-01-01
          • 2018-08-07
          • 1970-01-01
          • 2021-08-19
          相关资源
          最近更新 更多