我正在尝试在 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.
Run Code Online (Sandbox Code Playgroud)
尝试安装时。我已经删除并删除了 R 3.6.3 并添加了
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/
Run Code Online (Sandbox Code Playgroud)
在我的/etc/apt/sources.list文件中。请注意,libc6 (>= 2.29)从我所看到的情况来看,上述要求尚未在 18.04 中提供。这是否意味着我必须升级到 19.04 或 20.04 才能运行 R 4.0?
Shu*_*pta 13
我正在使用 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 R 现在已成功安装。
小智 6
问题可能出在您的/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/上还有两篇最近的(相关)帖子。
简而言之,在其他情况良好的系统上(即没有其他软件包强制或冲突或您有什么),只需添加新的存储库(在幻灯片和视频中显示),更新apt索引和升级。我在另一个视频中为我的 19.10 Ubuntu 系统做了同样的事情。