Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
I am having trouble installing rjags 2.0.0-2 on Ubuntu (Linux). I noticed
through searching on the internet (in particular finding entries on Roger
Levy's and Yu-Sung Su's blogs) that there have been a couple rounds of the
same problem with past versions (1.x.x.) of rjags , but I cannot tell if there
was a general solution that are still working in the 2.x.x version.
For rjags I followed the advice on Rogblog
debian-etch/> when he had this problem in rjags 1.0.3-4 I used
sudo R --with-jags-modules=/usr/local/lib/JAGS/modules-2.0.0/ CMD INSTALL
Then, when I try to load the library I get:
Loading required package: coda
Loading required package: lattice
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared library '/home/lluang/R/i486-pc-linux-gnu-
libjags.so.2: cannot open shared object file: No such file or directory
Error : .onLoad failed in 'loadNamespace' for 'rjags'
Error: package/namespace load failed for 'rjags'
Help on what I could try next would be appreciated.
I installed JAGS 2.0.0 (20100430) using:
sudo make install
I confirmed installation by running the classic-bugs volume 1 examples.
Inside my config.log from when I installed JAGS-2.0.0-20100430 the following
locations are defined
libjags.so.2 is a symbolic link in my /usr/local/lib directory that points to
libjags.so.2.0.0 which is also in my /usr/local/lib directory
Is /usr/local/lib on your default linker path? It might not be. Check with
The two solutions are:
a) Set LD_LIBRARY_PATH to include the location of the jags library, or
b) Set the default linker path, usually by editing /etc/ld.so.conf or adding a
suitable include file to /etc/ld.so.conf.d
The option --with-jags-modules is doing nothing as you are setting it to the
default directory. You can drop it.
Yes, adding /usr/local/lib in the /etc/ld.so.conf file seems to work. I ran
make Rcheck as well to confirm. Thank you.