gpt4 book ai didi

r - 有没有办法解决make rstan的错误

转载 作者:行者123 更新时间:2023-12-02 10:53:30 25 4
gpt4 key购买 nike

当我使用R CMD INSTALL rstan_2.14.1.tar.gz或更高版本进行脱机安装时,我使用CentOS6.8,R版本是3.4.0,gcc版本是4.47,错误是: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`

最佳答案

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

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。

关于r - 有没有办法解决make rstan的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55840996/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com