bsts软件包安装错误 [英] bsts package installation error

查看:197
本文介绍了bsts软件包安装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在R中安装bsts软件包时出现以下错误:

I'm receving following error when trying to install bsts package in R:

bsts.cc:71:5: error: 'clock_t' was not declared in this scope
     clock_t start_time = clock();
     ^
bsts.cc:72:29: error: 'CLOCKS_PER_SEC' was not declared in this scope
     double time_threshold = CLOCKS_PER_SEC * timeout_threshold_seconds;
                             ^
bsts.cc:82:17: error: expected ';' before 'current_time'
         clock_t current_time = clock();
                 ^
bsts.cc:83:13: error: 'current_time' was not declared in this scope
         if (current_time - start_time > time_threshold) {
             ^
bsts.cc:83:28: error: 'start_time' was not declared in this scope
         if (current_time - start_time > time_threshold) {
                            ^
make: *** [bsts.o] Error 1
Warning: running command 'make -f "Makevars" -f "C:/PROGRA~1/R/R-33~1.0/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-33~1.0/share/make/winshlib.mk" CXX='$(CXX1X) $(CXX1XSTD)' CXXFLAGS='$(CXX1XFLAGS)' CXXPICFLAGS='$(CXX1XPICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX1XLDFLAGS)' SHLIB_LD='$(SHLIB_CXX1XLD)' SHLIB="bsts.dll" OBJECTS="aggregate_time_series.o bsts.o mixed_frequency.o model_manager.o state_space_gaussian_model_manager.o state_space_logit_model_manager.o state_space_poisson_model_manager.o state_space_regression_model_manager.o state_space_student_model_manager.o utils.o"' had status 2
ERROR: compilation failed for package 'bsts'

我尝试了以下方法:

  1. devtools::install_github('cran/bsts')

直接从R Studio,这将下载.tar文件,并且在尝试安装该文件时出现相同的错误.

Straight from R Studio, this will download .tar file and I receive same error, when trying to install that.

R中bsts软件包的安装错误也有类似的问题,但是BOOMBoomSpikeSlab已为我正确安装.如果需要,我可以提供更多错误信息.如何安装该软件包?

install error of bsts package in R had similar problem, but BOOM and BoomSpikeSlab was correctly installed for me. I can provide more details from error, if needed. How can I get that package installed?

我的session.info:

My session.info:

> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=Finnish_Finland.1252  LC_CTYPE=Finnish_Finland.1252    LC_MONETARY=Finnish_Finland.1252 LC_NUMERIC=C                    
[5] LC_TIME=Finnish_Finland.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] devtools_1.11.1

loaded via a namespace (and not attached):
[1] httr_1.1.0    R6_2.1.2      tools_3.3.0   withr_1.0.1   curl_0.9.7    memoise_1.0.0 git2r_0.15.0  digest_0.6.9 

推荐答案

这实际上是与此问题相同的问题- -从本质上讲,这是操作员错误",因为该软件包没有随附来自CRAN的Windows二进制文件,这通常是非常强大的指示,它不能在Windows上构建.

This is actually the same issue as this question -- in essence, it is 'operator error' because the package does not come with a Windows binary from CRAN which is usually a very strong indication that it does not build on Windows.

尽管如此,CRAN也不习惯不在Windows上构建-Uwe Ligges在多特蒙德运营的站点通常会构建一切,并且可以合理地构建.我怀疑有潜在的技术问题.

CRAN is not in habit of not building on Windows out of spite---the site in Dortmund operated by Uwe Ligges usually builds everything that can reasonably be built. I suspect an underlying technical issue.

这篇关于bsts软件包安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆