首页 > 解决方案 > 无法在 Ubuntu 19.10 上安装 r-base;未满足的依赖关系 r-推荐

问题描述

一般来说,我是使用 Ubuntu (19.10;eoan) 的新手,目前正在尝试安装 r-base。r-base-dev 已安装。当我这样做时,我收到以下消息:

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.6.2-1xenial) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我已经使用以下线程来尝试解决我的问题 - 没有任何成功。

安装 r-base; 依赖:r-recommended 缺失?

安装 r-base-dev 的问题

对于这个我停在部分:“禁用/删除/清除 PPA:”。因为我无法理解这个过程。

https://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa

我将不胜感激任何解决我的问题的解决方案或建议。

标签: rubuntudependencies

解决方案


如果没有有关您实际尝试的内容(和订单)的更多信息,很难尝试找出它为什么不起作用,但我最近自己在 19.10 上安装了它。我用了以下。

# Get the key from the keyserver.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

# Add the repository to your sources.list. Make sure that it does not already exist
# and that it is not a typo in there. Making a backup of the file before running the
# next line is useful.
echo "deb https://cloud.r-project.org/bin/linux/ubuntu eoan-cran35/" | sudo tee -a /etc/apt/sources.list

# Install base, dev and other dependencies.
sudo apt install r-base r-base-dev r-cran-curl r-cran-openssl r-cran-xml2 libssl-dev libxml2-dev libcurl4-openssl-dev

它对我来说没有任何问题。将正确的存储库添加到您的sources.list. 从错误消息来看,您使用的是指 Ubuntu Xenial 而不是 Ubuntu Eoan 的存储库。


推荐阅读