[R] JAGS 4.x, rjags 4.x problems | Linux

Rainer Hurling rhurlin at gwdg.de
Thu Nov 5 15:45:52 CET 2015

Am 04.11.2015 um 21:36 schrieb Evan Cooch:
> On 11/4/2015 2:08 PM, Evan Cooch wrote:
>> Greetings --
>> This has also been posted on the jags forum, but since I suspect the
>> problem is more 'R-related' than jags, will aos post here.
>> Decided to 'upgrade' from jags 3.x.x to 4.x.x today, on my GNU/Linux
>> boxes (which run latest RHEL). Here are the basic details:
>> 1\ used R 3.2.2 compiled from source. 64-bit -- nothing fancy, other
>> than the fact that I used OpenBLAS instead of 'generic'. Works fine.
>> 2\ downloaded and compiled JAGS 4.0.1 from source (nothing fancy,
>> ./configure & make & make install) -- no errors. Runs fine as a
>> standalone app from CLI.
>> 3\ Downloaded rjags_4-3.tar.gz, and installed from R CLI (within R --
>> usual R CMD INSTALL approach). Again, no errors reported.
>> However, when I fire up R, and try something simple like
>> library(R2jags)
>> I get a whole slew of error messages - following is reproducible on
>> all my machines:
>> Loading required package: rjags
>> Loading required package: coda
>> Error : .onLoad failed in loadNamespace() for 'rjags', details:
>> call: dyn.load(file, DLLpath = DLLpath, ...)
>> error: unable to load shared object
>> '/usr/lib64/R/library/rjags/libs/rjags.so':
>> libjags.so.3: cannot open shared object file: No such file or directory
>> Error: package ‘rjags’ could not be loaded
> Further puzzlement -- I uninstalled R2jags and rjags, with the idea that
> re-installing them (ostensibly with the 'latest and greatest') would do
> the trick. While the process went fine for R2jags, when I tried to
> re-install rjags, got the following error messages:
> checking for gcc -m64 -std=gnu99 option to accept ISO C89... none needed
> checking for jags_version in -ljags... yes
> checking version of JAGS library... wrong version
> configure: error: rjags requires JAGS version 4.x.y
> ERROR: configuration failed for package ‘rjags’
> * removing ‘/usr/lib64/R/library/rjags’
> * restoring previous ‘/usr/lib64/R/library/rjags’

Hmm, is it possible, that your JAGS 4.x.y installation is fine, but an 
old libjags.so library is lying around from a not fully completed 
deinstallation? Could you have a look for older libjags.so versions, please?

Just a thought.

> I'm confused as to how it is not finding JAGS 4.x.y, which is not only
> most definitely on the system, but in the path:
> [root at euler egc]# jags
> Welcome to JAGS 4.0.1 on Wed Nov  4 15:35:12 2015
> JAGS is free software and comes with ABSOLUTELY NO WARRANTY
> Loading module: basemod: ok
> Loading module: bugs: ok

More information about the R-help mailing list