我使用 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 也很陌生,所以请尽可能提供逐步说明/建议!
我有类似的问题。我在启动时收到以下错误
Error in tools::startDynamicHelp() : internet routines cannot be loaded
经过调查,我发现我的防病毒软件已被隔离R-4.0.0/modules/x64/internet.dll
。不幸的是,我的防病毒设置是由组策略控制的,因此我无法禁用它们来寻求解决方案。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)