sudo apt-get 安装 r-base
sudo: unable to resolve host dev
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-base-core (>= 3.4.4-1xenial0) but it is not going to be installed
Depends: r-recommended (= 3.4.4-1xenial0) but it is not going to be installed
Recommends: r-base-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我想在我的 ubuntu 16.04 中安装 r。
请帮我!!!
答案1
当我看到“依赖:r-base-core(>= 3.4.4-1xenial0)”之类的消息时,这意味着所需的软件包 r-base-core 存在,但它是低级的(版本低于 3.4.4-1),所以无法使用。检查您的软件包管理器,看看这些软件包的哪个版本可用。除非所有依赖项都得到满足,否则您将无法安装 r-base。一种选择可能是下载源代码并自行编译,但这可能意味着您需要一堆开发包,因此您需要完成这项工作。我刚刚查看了我的 Ubuntu 18.04 笔记本电脑,根据我的 Synaptic 软件包管理器,r 的版本为 3.4.4-1。Ubuntu 18.10 的版本为 3.5.1-1。您可以尝试升级 Ubuntu。不久前,我从 16.04 升级到了 18.04,没有任何问题。如果您尝试这样做,请确保先做好备份。我不知道如何从 16.04 升级到 18.10。