[R-sig-Debian] problem with rjags installation in ubuntu 14.04

kenrichardson kenrichardson at gmx.com
Fri Sep 29 22:54:43 CEST 2017


Hello folks

Earlier versions of jags and rjags installed on my system without any 
difficulty, but I'm having trouble with jags version 
4.3.0-1ubuntu2~ubuntu14.04.1~ppa1 (from Michael Rutter's R ppa) and 
rjags version 4.6.

The call to install.packages() I always used successfully now produces 
the error "cannot link to JAGS library in /usr/lib/x86_64-linux-gnu."  
shown below

I wondered if the location of jags headers, libraries, and modules om my 
system might be in non-standard places, so after locating them (with 
dpkg -L jags and /sbin/ldconfig -p | grep jags - ) I tried

install.packages("rjags", 
configure.args="--with-jags-include=/usr/include/JAGS 
--with-jags-lib=/usr/lib/x86_64-linux-gnu
--with-jags-modules=/usr/lib/x86_64-linux-gnu/JAGS/modules-4")

which unfortunately produced the same result.

Any advice on how to sort this out would be appreciated. For example I 
could always try compiling both jags and/or rjags and hardcoding the 
location of jags libraries, but maybe there's a simpler way.

sessioninfo() and library() output are also shown below, but if other 
information is required please let me know

Regards Ken

-----------------------------------------------

install.packages("rjags")
Installing package into 
‘/home/krichardson/R/x86_64-pc-linux-gnu-library/3.4’ (as ‘lib’ is 
unspecified)
Warning: unable to access index for repository 
//http://cran.stat.auckland.ac.nz/src/contrib:
   cannot open URL '//http://cran.stat.auckland.ac.nz/src/contrib/PACKAGES'
trying URL 'http://cran.r-project.org/src/contrib/rjags_4-6.tar.gz'
Content type 'application/x-gzip' length 71719 bytes (70 KB)
==================================================
downloaded 70 KB

Loading required package: grDevices
Loading required package: graphics
Loading required package: stats
Loading required package: utils
Loading required package: nlme
This is mgcv 1.8-22. For overview type 'help("mgcv-package")'.
* installing *source* package ‘rjags’ ...
** package ‘rjags’ successfully unpacked and MD5 sums checked
checking for pkg-config... /usr/bin/pkg-config
configure: Setting compile and link flags according to pkg-config
configure: Compile flags are -I/usr/include/JAGS
configure: Link flags are -ljags
checking for gcc... gcc -std=gnu99
checking whether we are using the GNU C compiler... no
checking whether gcc -std=gnu99 accepts -g... no
checking for gcc -std=gnu99 option to accept ISO C89... unsupported
checking for jags_version in -ljags... no
configure: error: "cannot link to JAGS library in 
/usr/lib/x86_64-linux-gnu."
ERROR: configuration failed for package ‘rjags’

<snip>

In install.packages("rjags") :
  installation of package ‘rjags’ had non-zero exit status

-----------------------------------

sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.0
LAPACK: /usr/lib/lapack/liblapack.so.3.0

locale:
  [1] LC_CTYPE=en_NZ.UTF-8       LC_NUMERIC=C LC_TIME=en_NZ.UTF-8        
LC_COLLATE=en_NZ.UTF-8 LC_MONETARY=en_NZ.UTF-8
  [6] LC_MESSAGES=en_NZ.UTF-8    LC_PAPER=en_NZ.UTF-8 
LC_NAME=C                  LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_NZ.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] xtable_1.7-1 mgcv_1.8-22  nlme_3.1-131 MASS_7.3-47

loaded via a namespace (and not attached):

[1] compiler_3.4.1  Matrix_1.2-11   grid_3.4.1 lattice_0.20-35

------

library(help="rjags")
Description:

Package:              rjags
Version:              4-6
Date:                 2016-02-19
Title:                Bayesian Graphical Models using MCMC
Authors at R:            c(person("Martyn", "Plummer", role=c("aut","cre"), 
email="plummerm at iarc.fr"), person("Alexey", "Stukalov", role="ctb"),
                       person("Matt", "Denwood", role="ctb"))
Depends:              R (>= 2.14.0), coda (>= 0.13)
SystemRequirements:   JAGS 4.x.y
URL:                  http://mcmc-jags.sourceforge.net
Suggests:             tcltk
Description:          Interface to the JAGS MCMC library.
License:              GPL (== 2)
NeedsCompilation:     yes
Packaged:             2016-02-19 13:31:22 UTC; martyn
Author:               Martyn Plummer [aut, cre], Alexey Stukalov [ctb], 
Matt Denwood [ctb]
Maintainer:           Martyn Plummer <plummerm at iarc.fr>
Repository:           CRAN
Date/Publication:     2016-02-19 23:59:59
Built:                R 3.2.5; x86_64-pc-linux-gnu; "Sun, 01 May 2016 
18:23:42 +0000"; unix

Index:

LINE                    Linear regression example
adapt                   Adaptive phase for JAGS models
coda.samples            Generate posterior samples in mcmc.list format
dic.samples             Generate penalized deviance samples
diffdic                 Differences in penalized deviance
jags.model              Create a JAGS model object
jags.samples            Generate posterior samples
list.factories          Advanced control over JAGS
load.module             Dynamically load JAGS modules
mcarray.object          Objects for representing MCMC output
parallel.seeds          Get initial values for parallel RNGs
read.jagsdata           Read data files for jags models
rjags-deprecated        Deprecated Functions in the rjags package
rjags-package           Bayesian graphical models using MCMC
update.jags             Update jags models
variable.names.jags     Functions for manipulating jags model objects



More information about the R-SIG-Debian mailing list