尝试(重新)安装 R 时遇到困难

尝试(重新)安装 R 时遇到困难

我正在尝试在我的 ubuntu WSL 中(重新)安装 R。我已经完成了

sudo apt install r-base-core 但后来我尝试使用一些压缩版本更改为 R 4.0。最终,旧的 R 3 版本从我的系统中卸载,并且 R 4 正在运行。

基本上,我想使用 DESeq2 并安装一些像 apeglm 这样的库。

由于遇到一些问题,我删除了/移除了所有包含 R 的文件夹,包括“local/bin”和“local/lib”中的文件夹。

现在,我从头开始再次尝试,但我有以下问题:[in]

sudo apt install r-base-core

[出去]

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: zip but it is not installable
               Depends: unzip but it is not installable
               Depends: libpcre2-8-0 (>= 10.31) but it is not installable
               Recommends: r-recommended but it is not going to be installed
               Recommends: r-base-dev 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.

如果我尝试安装依赖项(例如“zip”),我会得到以下信息:

[在]

sudo apt-get install zip

[出去]

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package zip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'zip' has no installation candidate

=======

编辑:我经历过这个:https://cran.r-project.org/bin/linux/ubuntu/#install-r但从这部分开始它就不起作用了:

apt install --no-install-recommends r-base 输出与之前类似,说我缺少一些依赖...

编辑 2:我最初在 StackOverflow 上发布了这个问题,但一位高级用户告诉我,最好将其发布在 askubuntu 上,所以,我在这里。

=======

我知道我做错了几件事,但如果有人能帮我找到解决方法,我将不胜感激。如果是这种情况,我可以提供更多信息/日志。提前致谢!

相关内容