使用 install.packages 安装软件包时 RStudio 崩溃

2024-03-18

我正在尝试在 RStudio 中安装软件包,但无法做到这一点。安装软件包失败,但出现错误或警告。

我之前在安装 texlive-full 时遇到了问题,并且可能对我的 /etc/apt/sources.list.d 文件做了一些尴尬的事情。我遇到了以下问题:

install.packages('rstanarm')
Warning in install.packages :
  unable to access index for repository https://cloud.r- 
project.org/src/contrib:
  cannot open URL 'https://cloud.r-project.org/src/contrib/PACKAGES

这在另一个 stackoverflow 线程中得到了解决:无法在最新版本的 RStudio 和 R Version.3.1.1 中安装软件包 https://stackoverflow.com/questions/25599943/unable-to-install-packages-in-latest-version-of-rstudio-and-r-version-3-1-1

运行时: install.packages('rstanarm', 依赖项 = T, , repos='http://cran.rstudio.com/ http://cran.rstudio.com/')

R 失败并出现错误:

ERROR: failed to lock directory ‘[...]/R/x86_64-pc-linux-gnu- 
library/3.6’ for modifying
Try removing ‘[...]/R/x86_64-pc-linux-gnu-library/3.6/00LOCK- 
rstanarm’

我再一次在 stackoverflow 中尝试过R install.packages 返回“无法创建锁定目录” https://stackoverflow.com/questions/14382209/r-install-packages-returns-failed-to-create-lock-directory

和跑步

install.packages('rstanarm', dependencies = T, , 
repos='http://cran.rstudio.com/', INSTALL_opts = c('--no-lock'))

导致 RStudio 在安装过程中崩溃并关闭。

其他包也会发生这种情况。我在这上面花了几个小时,濒临放弃。有人知道会发生什么吗?

非常感谢!


确保您可以访问 Cran 组织站点。看来一天中的大部分时间都在下降。我刚得到: “找不到 cran.r-project.org 的服务器 IP 地址。”

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用 install.packages 安装软件包时 RStudio 崩溃 的相关文章

随机推荐