R更新后无法安装软件包:无法访问存储库的索引:无法加载Internet例程

问题描述 投票:2回答:2

我使用RStudio,昨天我将R更新到以下版本:

R version 4.0.0 (2020-04-24) -- "Arbor Day"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

现在,我无法连接到任何CRAN镜像(我已经尝试了4种不同的镜像)或安装软件包。启动RStudio时,在启动时出现以下错误:

Error in tools::startDynamicHelp() : internet routines cannot be loaded
Warning: namespace ‘lme4’ is not available and has been replaced
by .GlobalEnv when processing object ‘lmer1’
Warning: namespace ‘ggplot2’ is not available and has been replaced
by .GlobalEnv when processing object ‘plot1’
Warning: namespace ‘emmeans’ is not available and has been replaced
by .GlobalEnv when processing object ‘.Last.ref_grid’
Warning: namespace ‘pbkrtest’ is not available and has been replaced
by .GlobalEnv when processing object ‘.Last.ref_grid’
[Workspace loaded from C:/Users/xxx.RData]

Loading required package: lmerTest
Loading required package: lme4
Loading required package: Matrix
Error: package or namespace load failed for ‘lme4’:
 package ‘lme4’ was installed before R 4.0.0: please re-install it
Failed with error:  ‘package ‘lme4’ could not be loaded’

然后,当我尝试安装软件包时,收到以下消息:

Installing package into ‘C:/Users/xxx/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/src/contrib:
  internet routines cannot be loaded
Warning in install.packages :
  package ‘Rtools’ is not available (for R version 4.0.0)
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/bin/windows/contrib/4.0:
  internet routines cannot be loaded

我知道这些警告上有多个线程,但是我都没有找到解决此问题的方法。我已经尝试过但没有成功的事情:

  • 更改CRAN镜像设置-我尝试了4种不同的设置,并且镜像在起作用,因为它可以在另一台计算机上使用
  • 重新启动程序
  • 重新启动计算机
  • 更改“工具”>“全局选项”>“软件包”中的设置,以便取消选中https)>
  • 更新RStudio(尽管它在R中也是一个问题)
  • 卸载并重新安装R 4.0
  • 检查库路径-似乎正确
  • 将Internet Explorer设置为默认浏览器
  • 运行命令options(repos='https://cran.rstudio.com/')
  • 运行命令行install.packages("package name", dependencies=TRUE, repos='http://cran.rstudio.com/')
  • 运行命令options(download.file.method="libcurl")
  • 运行命令Sys.getenv("LD_LIBRARY_PATH")
  • 我的搭档将R 4.0和RStudio下载到他的计算机上,并且工作正常。

有什么建议吗?我是Stack Overflow的新手,而R是新手,因此,请在可能的情况下逐步说明/建议!

[我使用RStudio,昨天将R更新到以下版本:R版本4.0.0(2020-04-24)-“植树节”版权所有(C)2020 R统计计算平台基金会:x86_64-w64 -...

r repository rstudio install.packages
2个回答
2
投票

我有类似的问题。我在启动时纠正了以下错误


0
投票

因此,经过4个电话通话和多次解决此问题的尝试之后,我的机构IT部门今天能够禁用阻止R和R Studio工作的防病毒块。

© www.soinside.com 2019 - 2024. All rights reserved.