【问题标题】:Is there a way to solve the error of make rstan有没有办法解决make rstan的错误
【发布时间】:2019-04-25 02:30:19
【问题描述】:

我使用CentOS6.8,R版本是3.4.0,gcc版本是4.47,当我使用R CMD INSTALL rstan_2.14.1.tar.gz或更高版本离线安装时,错误是:make *** [chains.o]Error 1 ,什么是chains.o,我该如何解决它。帮助!

/opt/R-3.4.0/library/BH/include/boost/throw_exception.hpp:In function`void boost::throw_exception(const E&)`:
/opt/R-3.4.0/library/BH/include/boost/throw_exception.hpp:70:error`enable_ both:` is not a member of `boost::exception_detail`
In file included from /opt/R-3.4.0/library/BH/include/boost/random/detail/integer_log2.hpp:19,
from /opt/R-3.4.0/library/BH/include/boost/random/detail/large_arithmetic.hpp:19,
from /opt/R-3.4.0/library/BH/include/boost/random/detail/const_mod.hpp:23,
from /opt/R-3.4.0/library/BH/include/boost/random/linear_congruential.hpp:30,
from /opt/R-3.4.0/library/BH/include/boost/random/additive_combine.hpp:27,
from chains.cpp:29:
/opt/R-3.4.0/library/BH/include/boost/pending/integer_log2.hpp:At global scope:
/opt/R-3.4.0/library/BH/include/boost/pending/integer_log2.hpp:7:note:#pragma message :This header is deprecated .Use <boost/integer/integer_log2.hpp> instead.
make: *** [chains.o] Error 1
Error:compilation failed for package `rstan`

【问题讨论】:

  • 在那个单一的令人沮丧的错误消息之前是否有任何错误或警告或控制台消息?
  • 我添加了更多错误信息,谢谢
  • 使用 g++ 4.47 或任何低于 4.9 的版本都不适用于 rstan 2.18.x 或更高版本。而且您尝试编译的任何版本的 rstan 似乎都不适用于 BH 1.69.0。
  • 我在使用虚拟机 Standard_F2s_v2、Ubuntu 19.04、R 3.4.3 和 g++ (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609 的 Azure 上遇到了同样的错误。

标签: r compiler-errors rstan


【解决方案1】:

我在使用虚拟机 Standard_F2s_v2、Ubuntu 19.04R 3.4.3g++ (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609 在 Azure 上遇到了同样的错误,因为我正在使用

devtools::install_deps(dependencies = TRUE)

我的DESCRIPTION 有:

Imports:
    rstan (>= 2.18.2),

解决方案是单独安装没有版本的包:

.libPaths(c("~/R/x86_64-pc-linux-gnu-library/3.4", .libPaths()))
options(repos=structure(c(CRAN = "https://cran.r-project.org")))
packages <- c("devtools", ..., "rstan")
for (p in packages) {
  install.packages(p)
}

有关成功构建的完整详细信息,请参阅this Github branch,提交 1b3d1f6。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-08-21
    • 2020-12-13
    • 1970-01-01
    • 2021-06-03
    • 2018-05-16
    • 1970-01-01
    • 2021-05-28
    • 2021-06-05
    相关资源
    最近更新 更多