繁体   English   中英

是否无法在 Ubuntu 18.04.4 LTS 上安装 R 4.0,因为 r-base-core 需要 libc6 版本 >= 2.29?

[英]Is it impossible to install R 4.0 on Ubuntu 18.04.4 LTS because r-base-core requires a libc6 version >= 2.29?

我正在尝试在 Ubuntu 18.04.4 LTS 上安装 R 4.0,但我不断收到以下错误

> sudo apt 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.29) but 2.27-3ubuntu1 is to be installed
               Depends: libicu66 (>= 66.1-1~) but it is not installable
               Depends: libreadline8 (>= 6.0) but it is not installable
               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.

尝试安装时。 我已经删除并删除了 R 3.6.3 并添加了

deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/

在我的/etc/apt/sources.list文件中。 请注意,上面需要libc6 (>= 2.29) ,但据我所知,它不适用于 18.04。 这是否意味着我必须升级到 19.04 或 20.04 才能运行 R 4.0?

我正在使用 Ubuntu 18.04,为此应该有一个源deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/在 /etc/apt/sources.list 不幸的是,我添加了deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/错误地删除了它以安装 R 4.0 ZE1E1D3D40573127E9EE0480DAF128 现在已成功安装

问题可能出在您的/etc/apt/sources.list上。 请检查您是否已在其中禁用 R 的所有其他存储库,例如它不应包含像deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/

问题:您的系统是否是 18.04 的最新版本? 如果是这样,升级应该可以正常工作 我写了一篇关于在 18.04 上测试 R 4.0.0 的博客文章(在发布之前)以及一个视频:

http://dirk.eddelbuettel.com/blog/code/r4/最近的两个(相关)帖子也是如此。

简而言之,在一个其他方面都很好的系统上(即没有其他包被强制或冲突或你有什么),只需添加新的 repo(显示在幻灯片和视频中),更新apt索引和升级。 我在另一个视频中为我的 19.10 Ubuntu 系统做了同样的事情。

对于 Ubuntu 用户

须藤纳米 /etc/apt/sources.list

删除与下面给定路径相似的每一行

deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/

保存并退出编辑器

然后尝试按照以下链接中给定的方式安装 R 4.1.3

https://cloud.r-project.org/bin/linux/ubuntu/

我有 18.04,想要 R 4.x

我必须将 etc/apt/sources.list 编辑为

  1. 来源中没有 R 3.5
  2. 而不是让“... focal-cran40/”有“... bionic-cran40/”。

然后我用

sudo apt update
sudo apt install r-base

一切都奏效了

是的。 这可能是该特定软件包/版本中的错误,但如果您希望使用package,您应该升级到更新的 Ubuntu 版本。

使用命令sudo do-release-upgrade升级 Ubuntu 。 这假设您的用户有权运行 root/管理命令。 更多详细信息可在Ubuntu 社区网站上找到。

如果等待修复或升级不愉快,您可能会发现在 Docker 容器中运行 R 是更好的解决方案。 这是运行笨拙的开发工具的一种越来越普遍的方法。

我刚刚在 Ubuntu 20.04 上安装 R 4.0 时遇到了同样的问题,这是我的解决方案。 首先我只想安装 R 而不是 r-base-core 等等。 安装所有 r-base-core 和 r-base-dev 以此类推是行不通的。 仔细阅读官方文档https://cran.r-project.org/bin/linux/ubuntu/#install-r 如果问题仍然存在,请尝试更新/etc/apt/sources.list使用完整文件或处理备份文件

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM