devtools install_github安装报错: CAfile: microsoft-r-cacert.pem

匿名 (未验证) 提交于 2019-12-02 23:32:01
版权声明:博客授权, 请联系我, 微信: yijiaobani, 备注: 姓名+ 单位 https://blog.csdn.net/yijiaobani/article/details/90261716

报错信息

> install_github("dengfei2013/GS") Installation failed: error setting certificate verify locations:   CAfile: microsoft-r-cacert.pem   CApath: none 

解决方法

  1. 进入R, 卸载curl, httr, 重新安装
remove.packages(c("curl","httr")) install.packages(c("curl", "httr")) 
  1. 更换microsoft-r-cacert.pem
Sys.setenv(CURL_CA_BUNDLE="/opt/microsoft/ropen/3.5.1/lib64/R/lib/microsoft-r-cacert.pem") 

里面是我的路径, 你可以通过locate ,查看你的pem路径, 进行替换

  1. 测试install_github
library(devtools) install_github("dengfei2013/GS") 
> install_github("dengfei2013/GS")     Downloading GitHub repo dengfei2013/GS@master from URL https://api.github.com/repos/dengfei2013/GS/zipball/master Installing GS '/root/anaconda3/lib/R/bin/R' --no-site-file --no-environ --no-save  \   --no-restore --quiet CMD INSTALL  \   '/tmp/RtmpdN5qFa/devtools2bc37ead1356/dengfei2013-GS-f560b6c'  \   --library='/opt/microsoft/ropen/3.5.1/lib64/R/library' --install-tests   * installing *source* package ‘GS’ ... ** R ** data *** moving datasets to lazyload DB ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded * DONE (GS)  

搞定!

文章来源: https://blog.csdn.net/yijiaobani/article/details/90261716
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!