我正在尝试从 github 安装软件包,但当我安装时不断收到错误消息
使用install_github
.
library(devtools)
install_github(repo="swirl", username="ncarchedi")
Installing github repo(s) swirl/master from ncarchedi
Downloading swirl.zip from https://github.com/ncarchedi/swirl/archive/master.zip
Error in function (type, msg, asError = TRUE) :
error setting certificate verify locations:
CAfile: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RCurl/CurlSSL/cacert.pem
CApath: none
我尝试安装几个不同的软件包
(包括 ggmap 的更新版本),我总是遇到同样的错误。它
一定与 RCurl 有关,但我不明白问题出在哪里
是,或者如何解决它。我有 devtools(版本 1.3)和 RCurl
(版本 1.95-4.1)。我在 mac 上运行 R 版本 3.0.1(“Good Sport”)。
由于。。。导致的结果sessionInfo()
sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RCurl_1.95-4.1 bitops_1.0-5 devtools_1.3
loaded via a namespace (and not attached):
[1] digest_0.6.3 evaluate_0.4.3 httr_0.2 memoise_0.1 parallel_3.0.1 stringr_0.6.2
[7] tools_3.0.1 whisker_0.3-2
该问题是由于 R 包的更改造成的curl
.
您可以按如下方式解决该问题:
1)。打开新的 MRO 会话并删除软件包curl
and httr
:
remove.packages(c("curl","httr"))
2)。重新启动 MRO 并再次安装软件包,这次使用install.packages()
功能:
install.packages(c("curl", "httr"))
3)。设置环境变量CURL_CA_BUNDLE
:
Sys.setenv(CURL_CA_BUNDLE="/utils/microsoft-r-open-3.4.3/lib64/R/lib/microsoft-r-cacert.pem")
4).尝试使用安装包install_github()
来自 github(现在应该可以工作):
例如:
install_github("ropensci/tokenizer")
参考:
rvest read_html 功能不起作用
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)