r 安装期间未满足的依赖项 (Debian)

时间:2021-01-19 11:02:49

标签: r debian

当我尝试在 debian 10 中安装 r 软件时,出现未满足的依赖项错误。

The line "deb https://cloud.r-project.org/bin/linux/debian buster-cran40/" was already added in "/etc/apt/sources.list".

运行“apt install -t buster-cran40 r-base”后,我收到此消息:

"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 (>= 4.0.3-1~bustercran.0) but it is not going to be installed
          Depends: r-recommended (= 4.0.3-1~bustercran.0) 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."

我已经尝试过这些网站的方法: https://www.charlesbordet.com/en/how-to-upgrade-to-R-4-0-0-on-debian/#the-naive-solution

https://cran.r-project.org/bin/linux/debian/

我需要你的帮助。

2 个答案:

答案 0 :(得分:1)

检查您的 /etc/apt/sources.list,它应该包含常规 debian 存储库和 cran 存储库(删除重复项)。

检查您的 /etc/apt/sources.list.d 是否有重复输入。

然后运行:

sudo apt update
sudo apt install -t buster-cran40 r-base-core r-recommended r-base-html
sudo apt install -t buster-cran40 r-base

答案 1 :(得分:0)

问题确实出在“/etc/apt/sources.list”文件中,我在其中添加了带有命令行 sudo add-apt-repository 'deb link' 的波纹管链接。

deb http://deb.debian.org/debian buster main
deb-src http://deb.debian.org/debian buster main
deb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main
deb http://deb.debian.org/debian buster-updates main
deb-src http://deb.debian.org/debian buster-updates main
deb http://deb.debian.org/debian buster-backports main
deb-src http://deb.debian.org/debian buster-backports main
#deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
deb http://cloud.r-project.org/bin/linux/debian buster-cran40/
# deb-src http://cloud.r-project.org/bin/linux/debian buster-cran40/