R lubridate软件包安装 - 延迟加载失败

问题描述 投票:4回答:3

我想在ubuntu上安装q中的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
r lubridate
3个回答
6
投票

我遇到了同样的错误,试图在Red Hat的R版本2.15.3中安装lubridate。在看到你的问题之后,我去了CRAN检查了最新版本(1.3.2)的lubridate的发布日期。发布日期是2013年11月26日 - 就在几天前。从lubridate archive page,我下载了以前版本的存档,lubridate_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
投票

如果您阅读错误并与我有相同的消息:

“loadNamespace中的错误(j < - i [[1L]],c(lib.loc,.libPaths()),versionCheck = vI [[j]]):正在加载命名空间'Rcpp'0.12.12,但是> = 0.12.13是必需的“

您可能需要先安装Rcpp软件包,然后尝试安装lubridate软件包......它对我有用!


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

© www.soinside.com 2019 - 2024. All rights reserved.