S.O.: Linux Ubuntu 14.04 LTS R: R版本3.2.1(2015-06-18)--“ World-Famous Astronaut” 版权所有(C)2015年统计计算基金会 平台:i686-pc-linux-gnu(32位)
当我尝试安装rjags
包时,出现以下致命错误:
install.packages("rjags")
Installing package into ‘/home/marco/.rkward/library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://mirrors.softliste.de/cran/src/contrib/rjags_3-15.tar.gz'
Content type 'application/x-gzip' length 66879 bytes (65 KB)
==================================================
downloaded 65 KB
* installing *source* package ‘rjags’ ...
** package ‘rjags’ successfully unpacked and MD5 sums checked
checking for prefix by checking for jags... no
configure: error: "Location of JAGS headers not defined. Use configure arg '--with-jags-include' or environment variable 'JAGS_INCLUDE'"
ERROR: configuration failed for package ‘rjags’
* removing ‘/home/marco/.rkward/library/rjags’
The downloaded source packages are in
‘/tmp/RtmpditLat/downloaded_packages’
Warning message:
In install.packages("rjags") :
installation of package ‘rjags’ had non-zero exit status
显然,第一个错误信息是
configure: error: "未定义 JAGS header 的位置。使用 configure 参数 '--with-jags-include' 或环境变量 'JAGS_INCLUDE'"
我该如何解决这个问题?
jags
(一种用于贝叶斯MCMC模拟的简单吉布斯采样器)。在Ubuntu 14.04上,可以使用命令sudo apt-get install jags
进行安装。 - user3710546