【发布时间】:2020-10-17 04:36:23
【问题描述】:
有没有人有在 Ubuntu 20.04 上安装 R 的好方法?我似乎无法通过 apt 找到针对 20.04 焦点的特定解决方案。
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
编辑:通过链接here 并将条目添加到sources.list 后,我遇到了依赖项问题:
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.2-1.2004.0) but it is not going to be installed
Depends: r-recommended (= 4.0.2-1.2004.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.
根据@DirkEddelbuettel 的评论,我运行 sudo apt install r-base-core r-recommended r-base-html 来查看下一级依赖项:
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: libblas3 but it is not installable or
libblas.so.3 but it is not installable
Depends: liblapack3 but it is not installable or
liblapack.so.3 but it is not installable
Depends: libtcl8.6 (>= 8.6.0) but it is not installable
Depends: libtk8.6 (>= 8.6.0) but it is not installable
Recommends: r-base-dev but it is not going to be installed
Recommends: r-doc-html but it is not going to be installed
r-recommended : Depends: r-cran-kernsmooth (>= 2.2.14) but it is not going to be installed
Depends: r-cran-mgcv (>= 1.1.5) but it is not going to be installed
Depends: r-cran-rpart (>= 3.1.20) but it is not going to be installed
Depends: r-cran-survival (>= 2.13.2-1) but it is not going to be installed
Depends: r-cran-matrix but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
当我尝试安装 r-base 时,有一个更根本的问题。我最终发现在添加 PPA 后我遇到了未满足的依赖项问题。我使用此链接here 来解决未满足依赖项的潜在问题,这反过来又使我能够轻松安装并且没有任何安装问题。
【问题讨论】:
-
你尝试了什么命令?一般来说,
sudo apt install r-base r-base-dev应该可以工作 -
@HongOoi 我尝试通过将条目添加到 sources.list 来跟踪链接,运行 sudo apt-get update 和 sudo apt-get install r-base 并得到错误
The following packages have unmet dependencies: r-base : Depends: r-base-core (>= 4.0.2-1.2004.0) but it is not going to be installed Depends: r-recommended (= 4.0.2-1.2004.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. -
@duckmayr 我也这么认为。它不应该像我想象的那么艰难
-
无论如何,您现在需要继续。将
libblas3 liblapack3 libtcl8.6 libtk8.6添加到同一行,看看你得到了什么。 这确实收敛。某处的某事造成了冲突。 (我是从几年前建成后每六个月升级一次的 20.04 系统打字的。)
标签: r ubuntu-20.04