在 Ubuntu 16.04 上安装 R 时未满足的依赖项

Aku*_*usa 6 package-management apt dependencies r 16.04

我想安装新的 R 版本,所以我通过删除所有 r-* 进行了清除。然后我不幸地打破了一切。我尝试通过键入重新安装 R 项目

sudo apt install r-base r-base-core r-recommended
Run Code Online (Sandbox Code Playgroud)

然后我得到

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.27) but 2.23-0ubuntu11 is to be 
               installed  
               Depends: libcurl4 (>= 7.28.0) but it is not installable  
               Depends: libicu60 (>= 60.1-1~) but it is not installable  
               Depends: libreadline7 (>= 6.0) but it is not installable  
               Recommends: r-base-dev but it is not going to be installed  
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)

有谁知道如何解决这个问题?

Aku*_*usa 12

我的问题解决了。

我已经把错误的根源在我的sources.list下载最新版本的R的继中给出的说明https://cloud.r-project.org/,我已经把deb https://cloud.r-project.org/bin/linux/ubuntu cosmic-cran35/替代deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/

通过修改源,现在一切正常。


小智 0

尝试这个:

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install libc6 libcurl4 libicu60-dev libreadline7
sudo apt-get install r-base r-base-core r-recommended
Run Code Online (Sandbox Code Playgroud)