【发布时间】: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-devDebian 包。可能我需要重新安装 R。想知道 R 安装是否会自动检测到 libcurl 可用? -
我想您可以按照文档的建议将您的
options写入,Rprofile文件。