【问题标题】:Unsupported URL scheme error, how to use "https" CRAN mirrors in R 3.2.4?不支持的 URL 方案错误,如何在 R 3.2.4 中使用“https”CRAN 镜像?
【发布时间】:2016-04-11 13:31:39
【问题描述】:

当我运行 install.packages("packagename") 时,系统会提示我选择 CRAN 镜像。

  • 如果我选择 https 镜像,则会出现以下错误消息:

    unsupported URL scheme 
    
  • 如果我选择 http 镜像(选项 22),安装将继续,不会出现此警告。

如何让install.packages() 支持https 镜像?

如果这很重要的话,我正在使用 32 位版本的 R。

【问题讨论】:

  • this 有帮助吗?
  • 谢谢我添加了options(download.file.method = "libcurl"),但R抱怨download.file(method = 'libcurl') is not supported on this platform。 download.file 帮助页面说Support for method "libcurl" is optional: use capabilities("libcurl") to see if it is supported on your build. (It uses an external library of that name (http://curl.haxx.se/libcurl/) against which R can be compiled.)
  • " 如果不是(即功能(“libcurl”)== FALSE),您可以按照以下早期版本 R 的说明配置备用安全方法。”
  • 是的,options(download.file.method = "wget") 现在可以从 https 镜像安装软件包。使用外部命令wget 似乎是一种解决方法。我仍然想知道如何在本机上提供 https 下载。我在安装 R 之后已经安装了libcurl4-gnutls-dev Debian 包。可能我需要重新安装 R。想知道 R 安装是否会自动检测到 libcurl 可用?
  • 我想您可以按照文档的建议将您的 options 写入 ,Rprofile 文件。

标签: r cran


【解决方案1】:

试试这个: install.packages("packagename", repos="http://cran.cnr.berkeley.edu")

【讨论】:

  • 我不认为这回答了 OP 的问题:这对应于“如果我选择 http 镜像(选择 22),安装继续进行而不出现此警告”,因为 OP 已经知道该怎么做...
猜你喜欢
  • 2012-07-14
  • 1970-01-01
  • 2022-12-12
  • 2013-11-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-01-18
相关资源
最近更新 更多