从github下载库时出错(Error when downloading library from github)

编程入门 行业动态 更新时间:2024-10-27 06:29:32
从github下载库时出错(Error when downloading library from github)

我尝试按如下方式将github库安装到R时遇到了错误:

install.packages("devtools") library(devtools) install_github("swager/balanceHD")

但是,显示以下错误消息:

Downloading github repo swager/balanceHD@master Error: 'new_handle' is not an exported object from 'namespace:curl'

任何想法为什么发生这种情况?

PS:这是devtools :: session_info()的输出:

Session info --------------------------------------------------------------- setting value version R version 3.0.2 (2013-09-25) system x86_64, darwin10.8.0 ui RStudio (0.98.953) language (EN) collate en_US.UTF-8 tz Packages ------------------------------------------------------------------- package * version date source curl * 0.5 2015-02-01 CRAN (R 3.0.2) data.table 1.9.2 2014-02-27 CRAN (R 3.0.2) devtools 1.7.0 2015-01-17 CRAN (R 3.0.2) httr * 1.0.0.9000 2015-06-29 Github (hadley/httr@d9395f2) MASS 7.3-37 2015-01-10 CRAN (R 3.0.2) plyr 1.8.1 2014-02-26 CRAN (R 3.0.2) R6 * 1.0.1 2014-07-17 CRAN (R 3.0.2) Rcpp * 0.11.5 2015-03-06 CRAN (R 3.0.2) reshape2 * 1.4.1 2014-12-06 CRAN (R 3.0.2) rstudio * 0.98.953 2014-07-09 local rstudioapi * 0.2 2014-12-31 CRAN (R 3.0.2) stringr * 0.6.2 2012-12-06 CRAN (R 3.0.0)

I encountered error when I try to instal a github library to R as follows:

install.packages("devtools") library(devtools) install_github("swager/balanceHD")

However, the following error message is displayed:

Downloading github repo swager/balanceHD@master Error: 'new_handle' is not an exported object from 'namespace:curl'

Any idea on why this happens?

PS: Here's the output of devtools::session_info():

Session info --------------------------------------------------------------- setting value version R version 3.0.2 (2013-09-25) system x86_64, darwin10.8.0 ui RStudio (0.98.953) language (EN) collate en_US.UTF-8 tz Packages ------------------------------------------------------------------- package * version date source curl * 0.5 2015-02-01 CRAN (R 3.0.2) data.table 1.9.2 2014-02-27 CRAN (R 3.0.2) devtools 1.7.0 2015-01-17 CRAN (R 3.0.2) httr * 1.0.0.9000 2015-06-29 Github (hadley/httr@d9395f2) MASS 7.3-37 2015-01-10 CRAN (R 3.0.2) plyr 1.8.1 2014-02-26 CRAN (R 3.0.2) R6 * 1.0.1 2014-07-17 CRAN (R 3.0.2) Rcpp * 0.11.5 2015-03-06 CRAN (R 3.0.2) reshape2 * 1.4.1 2014-12-06 CRAN (R 3.0.2) rstudio * 0.98.953 2014-07-09 local rstudioapi * 0.2 2014-12-31 CRAN (R 3.0.2) stringr * 0.6.2 2012-12-06 CRAN (R 3.0.0)

最满意答案

首先,我认为你应该更新R 3.0.2被认为是古老的。 毫无疑问,当时它仍然是一个伟大的软件,而且现在依然如此,但考虑到语言及其整个环境的发展速度,3年时间是一大堆时间。

如果一切都是最新的,R和其他程序(如curl )之间的通信就容易得多。 加上错误更容易追踪,因为这里的大多数人无法轻松地重现您的问题。 大多数人有更新的R安装,整个生态系统也更新。

First of all, I think you should update R. 3.0.2 is considered ancient. No doubt it was a great piece of software back then and in a way still is, but 3 years is a ton of time given the pace at which the language and its entire environment has been evolving.

If everything is up-to-date, communication between R and other programs such as curl is much easier. Plus bugs are easier to track down, because most of the people here cannot reproduce your problem easily. Most people have much newer installations of R and also the entire ecosystem is much newer.

更多推荐

本文发布于:2023-04-28 02:30:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1329846.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Error   github   library   downloading

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!