我正在尝试在ubuntu上的R中安装lubridate
。
我收到了以下错误。从其他来源了解这与我的系统有关。你能帮我解决这个问题:
> install.packages('lubridate')
Installing package(s) into ‘/home/leader/R/i686-pc-linux-gnu-library/2.15’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/lubridate_1.3.2.tar.gz'
Content type 'application/x-gzip' length 284897 bytes (278 Kb)
opened URL
==================================================
downloaded 278 Kb
* installing *source* package ‘lubridate’ ...
** package ‘lubridate’ successfully unpacked and MD5 sums checked
** R
** data
** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in setClass("Period", contains = c("Timespan", "numeric"), slots = c(year = "numeric", :
unused argument(s) (slots = c(year = "numeric", month = "numeric", day = "numeric", hour = "numeric", minute = "numeric"))
Error : unable to load R code in package ‘lubridate’
ERROR: lazy loading failed for package ‘lubridate’
* removing ‘/home/leader/R/i686-pc-linux-gnu-library/2.15/lubridate’
Warning message:
In install.packages("lubridate") :
installation of package ‘lubridate’ had non-zero exit status
答案 0 :(得分:6)
我遇到了同样的错误,试图在Red Hat的R版本2.15.3中安装lubridate。在看到你的问题之后,我去了CRAN检查了最新版本(1.3.2)的lubridate的发布日期。发布日期是2013年11月26日 - 就在几天前。从lubridate archive page,我下载了以前版本的存档,luridate_1.3.1.tar.gz,于2013年3月31日发布。
使用命令 -
R CMD INSTALL lubridate_1.3.1.tar.gz
我能够在我的R 2.15.3安装中安装lubridate 1.3.1。
答案 1 :(得分:1)
如果您阅读错误并收到与我相同的消息:
“loadNamespace中的错误(j< - i [[1L]],c(lib.loc,.libPaths()),versionCheck = vI [[j]]): 正在加载命名空间'Rcpp'0.12.12,但需要> = 0.12.13“
您可能需要先安装Rcpp
软件包,然后尝试安装lubridate
软件包......它对我有用!
答案 2 :(得分:0)
对于Windows,请在此处获取最新版本:https://cran.r-project.org/web/packages/lubridate/index.html
按照此处所述安装install.packages(path_to_file, repos = NULL, type="source")
:https://stackoverflow.com/a/1474125/2745116