[R-SIG-Mac] issues running jags

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Oct 15 08:20:11 CEST 2014


On 23/09/2014 00:03, Joanna Burgar wrote:
> Good day,
>
> I am trying to run R2jags on  R version 3.0.2 (2013-09-25) -- "Frisbee Sailing". I have downloaded jags (JAGS-Mavericks-3.4.0) and successfully installed both rjags and R2jags yet for some reason when I try and load the library(rjags) I receive the following error message:
>
> Error : .onLoad failed in loadNamespace() for 'rjags', details:
>    call: dyn.load(file, DLLpath = DLLpath, ...)
>    error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so':
>    dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so, 10): Symbol not found: __ZN5RangeC1ERKSt6vectorIiSaIiEES4_
>    Referenced from: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so
>    Expected in: /usr/local/lib/libjags.3.dylib
>   in /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so
> Error: package or namespace load failed for ‘rjags’
>
>
> Does anyone have any idea why this might be? I have also tried other versions of R and it doesn't seem to be working for them either.

First, as the R posting guide says, we only support current versions of 
R on the mailing lists  It asked you to update *before posting*.

Second, you did not tell us your exact OS.  <= 10.8 and >= 10.9 default 
to different and incompatible C++ compilers: R and JAGS have to be built 
with the same one.  Now, binary distributions of R 3.0.2 were built with 
g++ 4.2.x: 
http://sourceforge.net/projects/mcmc-jags/files/JAGS/3.x/Mac%20OS%20X/ 
shows builds for Mavericks and SnowLeopard, and it is the latter which 
is compatible with the binary R 3.0.2.

> Thanks!
> Joanna
>
> _______________________________________________________
>> install.packages("rjags", dependencies=TRUE)
> also installing the dependency ‘coda’
>
> trying URL 'http://cran.ms.unimelb.edu.au/bin/macosx/contrib/3.0/coda_0.16-1.tgz'
> Content type 'application/x-gzip' length 195822 bytes (191 Kb)
> opened URL
> ==================================================
> downloaded 191 Kb
>
> trying URL 'http://cran.ms.unimelb.edu.au/bin/macosx/contrib/3.0/rjags_3-13.tgz'
> Content type 'application/x-gzip' length 155926 bytes (152 Kb)
> opened URL
> ==================================================
> downloaded 152 Kb
>
>
> The downloaded binary packages are in
> 	/var/folders/zl/w_8jclgx3zngdxtn_kmfb79m0000gn/T//RtmpfXMoO5/downloaded_packages
>> install.packages("R2jags", dependencies=TRUE)
> also installing the dependencies ‘abind’, ‘R2WinBUGS’
>
> trying URL 'http://cran.ms.unimelb.edu.au/bin/macosx/contrib/3.0/abind_1.4-0.tgz'
> Content type 'application/x-gzip' length 32962 bytes (32 Kb)
> opened URL
> ==================================================
> downloaded 32 Kb
>
> trying URL 'http://cran.ms.unimelb.edu.au/bin/macosx/contrib/3.0/R2WinBUGS_2.1-19.tgz'
> Content type 'application/x-gzip' length 777630 bytes (759 Kb)
> opened URL
> ==================================================
> downloaded 759 Kb
>
> trying URL 'http://cran.ms.unimelb.edu.au/bin/macosx/contrib/3.0/R2jags_0.04-03.tgz'
> Content type 'application/x-gzip' length 55203 bytes (53 Kb)
> opened URL
> ==================================================
> downloaded 53 Kb
>
>
> The downloaded binary packages are in
> 	/var/folders/zl/w_8jclgx3zngdxtn_kmfb79m0000gn/T//RtmpfXMoO5/downloaded_packages
>
>
>> library(rjags)
> Loading required package: coda
> Loading required package: lattice
> Error : .onLoad failed in loadNamespace() for 'rjags', details:
>    call: dyn.load(file, DLLpath = DLLpath, ...)
>    error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so':
>    dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so, 10): Symbol not found: __ZN5RangeC1ERKSt6vectorIiSaIiEES4_
>    Referenced from: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so
>    Expected in: /usr/local/lib/libjags.3.dylib
>   in /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so
> Error: package or namespace load failed for ‘rjags’
>>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
1 South Parks Road, Oxford OX1 3TG, UK



More information about the R-SIG-Mac mailing list