Roger Levy
2008-Nov-08 22:31 UTC
[R] unable to install rjags on 64-bit Debian Linux (etch)
While I have been able to install rjags on my Windows computer, oddly I have been unable to install rjags successfully on my 64-bit Linux compute server (etch, Linux kernel 2.6.18). I am required to specify the JAGS module directory upon installation; when doing this within R, I get: install.packages("rjags",configure.args="--with-jags-modules=/usr/local/lib/JAGS/modules/") which works fine, but then trying to load rjags gives an error: > library(rjags) \Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/usr/local/lib64/R/library/rjags/libs/rjags.so': libjags.so.1: cannot open shared object file: No such file or directory Error : .onLoad failed in 'loadNamespace' for 'rjags' Error: package/namespace load failed for 'rjags' I'm not sure how to read this error. Does anyone have any suggestions? Many thanks, Roger
Prof Brian Ripley
2008-Nov-09 09:16 UTC
[R] unable to install rjags on 64-bit Debian Linux (etch)
On Sat, 8 Nov 2008, Roger Levy wrote:> While I have been able to install rjags on my Windows computer, oddly I have > been unable to install rjags successfully on my 64-bit Linux compute server > (etch, Linux kernel 2.6.18). I am required to specify the JAGS module > directory upon installation; when doing this within R, I get: > >install.packages("rjags",configure.args="--with-jags-modules=/usr/local/lib/JAGS/modules/")> > which works fine, but then trying to load rjags gives an error: > >> library(rjags) > \Error in dyn.load(file, DLLpath = DLLpath, ...) : > unable to load shared library > '/usr/local/lib64/R/library/rjags/libs/rjags.so': > libjags.so.1: cannot open shared object file: No such file or directory > Error : .onLoad failed in 'loadNamespace' for 'rjags' > Error: package/namespace load failed for 'rjags' > > I'm not sure how to read this error. Does anyone have any suggestions?It means that ld.so (the runtime linker) cannot find libjags.so.1. Where is your libjags.so.1? My guess is that you installed it into /usr/local/lib, since that is what you have for your module path. On a 64-bit Linux system it should be in /usr/local/lib64. (I had to tell the JAGS installation that via libdir=/usr/local/lib64 on the configure line.) R CMD ldd /usr/local/lib64/R/library/rjags/libs/rjags.so will probably confirm that libjags.so.1 is not found. If that is not the error, please note what the R posting guide says about asking the maintainer. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
plummer at iarc.fr
2008-Nov-09 10:49 UTC
[R] unable to install rjags on 64-bit Debian Linux (etch)
Hi Roger, Try this: install.packages("rjags",configure.args="--with-jags-lib=/usr/local/lib") The original sin here is that R is installed in the wrong place. By default, R is installed into /usr/local/lib64 on 64-bit Linux. But this is a non-standard location on Debian: it should go in /usr/local/lib. (The Debian binary packages for R put everything in the right place). I know the rjags configuration needs a bit of work, but a fully functional version will have to wait until version 2 of the JAGS library. I hope this helps. If it does not, then write to me off-list. Martyn Quoting Roger Levy <rlevy at ucsd.edu>:> While I have been able to install rjags on my Windows computer, oddly I > have been unable to install rjags successfully on my 64-bit Linux > compute server (etch, Linux kernel 2.6.18). I am required to specify > the JAGS module directory upon installation; when doing this within R, I > get: > >install.packages("rjags",configure.args="--with-jags-modules=/usr/local/lib/JAGS/modules/")> > which works fine, but then trying to load rjags gives an error: > > > library(rjags) > \Error in dyn.load(file, DLLpath = DLLpath, ...) : > unable to load shared library > '/usr/local/lib64/R/library/rjags/libs/rjags.so': > libjags.so.1: cannot open shared object file: No such file or directory > Error : .onLoad failed in 'loadNamespace' for 'rjags' > Error: package/namespace load failed for 'rjags' > > I'm not sure how to read this error. Does anyone have any suggestions? > > Many thanks, > > Roger >----------------------------------------------------------------------- This message and its attachments are strictly confidenti...{{dropped:8}}
Sebastian P. Luque
2008-Nov-09 16:00 UTC
[R] unable to install rjags on 64-bit Debian Linux (etch)
Hi Roger, On Sat, 08 Nov 2008 14:31:01 -0800, Roger Levy <rlevy at ucsd.edu> wrote:> While I have been able to install rjags on my Windows computer, oddly > I have been unable to install rjags successfully on my 64-bit Linux > compute server (etch, Linux kernel 2.6.18). I am required to specify > the JAGS module directory upon installation; when doing this within R, > I get:> install.packages("rjags",configure.args="--with-jags-modules=/usr/local/lib/JAGS/modules/")> which works fine, but then trying to load rjags gives an error:>> library(rjags) > \Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load > shared library /usr/local/lib64/R/library/rjags/libs/rjags.so': > libjags.so.1: cannot open shared object file: No such file or > directory Error : .onLoad failed in 'loadNamespace' for 'rjags' Error: > package/namespace load failed for 'rjags'> I'm not sure how to read this error. Does anyone have any > suggestions?In addition to the other suggestions, keep an eye out on the jags Debian package (thanks to Dirk Eddelbuettel), which should hit the etch distribution soon hopefully (in sid now). Once installed, you don't (at least I didn't) need to pass any 'configure.args' to install.packages(). -- Seb