无法安装任何R软件包“无法访问存储库的索引”

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

我已经尝试了stackoverflow上的主要修复程序,但是没有运气:

  • 关闭“使用安全下载方法”>
  • 将主CRAN存储库更改为全局
  • 卸载/重新安装R
    Warning in install.packages :
      unable to access index for repository http://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6:
      cannot open URL "http://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/PACKAGES"

有什么想法吗?这一切都是在尝试安装pdftools之后开始的(它本身在pkgconfig中有问题)。

编辑:这是完整的代码块。它设法从源代码下载,但是退出状态为零

install.packages("ggplot2")
Installing package into ‘/Users/jackshaw/Library/R/3.6/library’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository https://cloud.r-project.org/bin/macosx/el-capitan/contrib/3.6:
  cannot open URL 'https://cloud.r-project.org/bin/macosx/el-capitan/contrib/3.6/PACKAGES'
installing the source package ‘ggplot2’

trying URL 'https://cloud.r-project.org/src/contrib/ggplot2_3.3.0.tar.gz'
Content type 'application/x-gzip' length 3031461 bytes (2.9 MB)
==================================================
downloaded 2.9 MB

[1] "R PROFILE LOADED"

The downloaded source packages are in
    ‘/private/var/folders/c1/5c3yn_tx2fq7nrcjs_kn637r0000gn/T/RtmpjcV10X/downloaded_packages’
Warning message:
In install.packages("ggplot2") :
  installation of package ‘ggplot2’ had non-zero exit status

我已经尝试了在stackoverflow上看到的主要修复程序,但是没有运气:关闭“使用安全下载方法,将主CRAN存储库更改为全局卸载/重新安装R警告安装...。

r package install
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.