【问题标题】:R installation errors on ubuntu 14.04ubuntu 14.04 上的 R 安装错误
【发布时间】:2017-01-20 21:43:47
【问题描述】:

我正在尝试在我的 ubuntu 14.04 上安装 R,但我在这方面遇到了很多错误

当我运行 r-base-core 时出现以下错误,请告诉我我必须做哪些更改才能安装这些损坏的软件包

dev@dev-OptiPlex-780:~$ sudo apt-get install r-base-core
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-core : Depends: libc6 (>= 2.23) but 2.19-0ubuntu6.9 is to be installed
               Depends: libgomp1 (>= 4.9) but 4.8.4-2ubuntu1~14.04.3 is to be installed
               Recommends: r-recommended but it is not going to be installed
               Recommends: r-base-dev but it is not going to be installed
               Recommends: r-doc-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我检查了Libc6的安装版本,这是我得到的

libc6:
  Installed: 2.19-0ubuntu6.9
  Candidate: 2.19-0ubuntu6.9
  Version table:
 *** 2.19-0ubuntu6.9 0
        500 http://de.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.19-0ubuntu6 0
        500 http://de.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
libc6-dev:
  Installed: 2.19-0ubuntu6.9
  Candidate: 2.19-0ubuntu6.9

甚至是 libgomp1

 Installed: 4.8.4-2ubuntu1~14.04.3
  Candidate: 4.8.4-2ubuntu1~14.04.3
  Version table:
 *** 4.8.4-2ubuntu1~14.04.3 0
        500 http://de.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     4.8.2-19ubuntu1 0
        500 http://de.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

还有 r-base-core 缓存

root@dev-OptiPlex-780:/home/dev# apt-cache policy r-base-core
r-base-core:
  Installed: (none)
  Candidate: 3.3.1-1xenial0
  Version table:
     3.3.1-1xenial0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ xenial/ Packages
     3.3.1-1trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
        500 http://ppa.launchpad.net/marutter/rrutter/ubuntu/ trusty/main amd64 Packages
     3.3.0-2xenial0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ xenial/ Packages
     3.3.0-2trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.3.0-1xenial0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ xenial/ Packages
     3.3.0-1trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.2.5-1xenial 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ xenial/ Packages
     3.2.5-1trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.2.4-revised-1trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.2.4-1trusty 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.2.3-6trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.2.3-4trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.2.3-3trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.2.3-1trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.2.2-1trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.2.1-4trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.2.1-3trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.2.1-2trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.2.1-1trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.2.0-4trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.2.0-1trusty 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.1.3-1trusty 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.1.2-1trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.1.1-1trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.1.0-1trusty0 0
        500 http://cran.rstudio.com/bin/linux/ubuntu/ trusty/ Packages
     3.0.2-1ubuntu1 0
        500 http://de.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

【问题讨论】:

    标签: r ubuntu packages failed-installation


    【解决方案1】:

    正如我所怀疑的 in my comment above,您通过指向 Ubuntu 16.04 aka xenial 来“混淆”您的系统,如您的输出所示:

    root@dev-OptiPlex-780:/home/dev# apt-cache policy r-base-core
    r-base-core:
      Installed: (none)
      Candidate: 3.3.1-1xenial0
      Version table:
         3.3.1-1xenial0 0
            500 http://cran.rstudio.com/bin/linux/ubuntu/ xenial/ Packages
    

    修复很简单。在/etc/apt/sources.list/etc/apt/sources.list.d/*.list 之一中,将xenial 替换为trusty 并运行apt-get update。之后你应该可以更新了。

    【讨论】:

    • 我没有在 /etc 文件夹中看到 sources.list
    • 我在这些路径中删除了一个(重要的)apt/。现已更正。
    • 当我从 xenial 更改为 trusty 并保存文件时,它不允许我保存
    • 通过sudo vi /etc/apt/sources.list.d/cran.list(或任何你的文件名)编辑
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-21
    • 2016-10-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多