我在用一个arch64Ubuntu 22.04.1 LTS (jammy),系统默认的 R 是 R 版本 4.1.2 (2021-11-01) -- “Bird Hippie”。我尝试按照以下说明将 R 升级到最新版本 4.2.1Ubuntu 的 R 软件包 - 简要说明没有任何运气。
我收到的错误信息是:
$ sudo apt-get install --no-install-recommends r-base
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 4.2.1-2.2204.0) but 4.1.2-1ubuntu2 is to be installed
Depends: r-recommended (= 4.2.1-2.2204.0) but 4.1.2-1ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages.
我尝试使用--only-upgrade
选项,但它不起作用:
$ sudo apt-get install --only-upgrade r-base
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 4.2.1-2.2204.0) but 4.1.2-1ubuntu2 is to be installed
Depends: r-recommended (= 4.2.1-2.2204.0) but 4.1.2-1ubuntu2 is to be installed
Recommends: r-base-html but it is not going to be installed
Recommends: r-doc-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我尝试删除 4.1.2 版本并从头开始安装 4.2.1:
$ sudo apt-get purge r-base* r-recommended r-cran-*
$ sudo apt update
$ sudo apt autoremove
$ sudo apt-get install --no-install-recommends r-base
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 4.2.1-2.2204.0) but it is not going to be installed
Depends: r-recommended (= 4.2.1-2.2204.0) but it is not going to be installed
但是,当我尝试在 AMD64 Ubuntu 22.04.1 LTS (jammy) 上将 R 从 4.1.2 升级到 4.2.1 时,上述所有命令均有效。可能是 amd64 (aarch64) repo 下的 R 二进制构建杰米克兰依赖关系被破坏了?还有人遇到过同样的问题吗?应该提交错误报告吗?提前致谢。
答案1
请注意,为了安装R 4.2.*,当前支持的版本是:
Jammy Jellyfish(22.04,仅限 amd64)
Impish Indri(21.10,仅限 amd64)、
Focal Fossa(20.04;LTS 和仅限 amd64)、
Bionic Beaver(18.04;LTS)和
Xenial Xerus(16.04;LTS)。
要检查您的体系结构:
跑步uname -m