安装失败且符号未定义时如何安装 rjags:_ZN4jags7Console10setRNGnameERKNSt[...]

问题描述 投票:0回答:1

install.packages("rjags")
install.packages("rjags", configure.args="--enable-rpath")
rjags
中推荐的
INSTALL
失败并出现以下错误:

** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘rjags’:
 .onLoad failed in loadNamespace() for 'rjags', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/<path to r libraries>/R_libraries/00LOCK-rjags/00new/rjags/libs/rjags.so':
  /<path to r libraries>/R_libraries/00LOCK-rjags/00new/rjags/libs/rjags.so: undefined symbol: _ZN4jags7Console10setRNGnameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘<path to r libraries>/R_libraries/rjags’
Warning in install.packages :
  installation of package ‘rjags’ had non-zero exit status
r installation jags rjags
1个回答
0
投票

显然,当

JAGS
rjags
使用不同的编译器(/版本)时会出现此问题。阅读了 JAGS 支持论坛中的这些评论后,我将用于编译
rjags
的编译器更改为系统默认值,该编译器可能也用于通过卸载我使用的
JAGS
模块来构建
gcc/7.2.0
(
module rm gcc/7.2.0
) .

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