Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing rjags on a Mac

To install

  1. Install jags: in the terminal using homebrew brew install jags
  2. Install rjags: in R
install.packages("rjags")
library(rjags)

Potential issues

Compiler issues

If you run into a problem like:

configure: error: C++ compiler cannot create executables

It's probably because R is not finding the right compiler, therefore you need to create or modify the file ~/.R/Makevars

Setting the correct CC and CXX, in my case:

CC=clang
CXX=clang++

Do this and then retry install.packages("rjags") or devtools::install_url.

Non-default jags installation

The problem

I installed jags via homebrew. However, my homebrew is setup on my home directory (/Users/casallas/homebrew) rather than the default, /usr/local.

When I do

install.packages("rjags")

everything works fine, except that loading the library doesn't work:

library(rjags)
Error : .onLoad failed in loadNamespace() for 'rjags', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Users/casallas/Library/R/3.0/library/rjags/libs/rjags.so':
  dlopen(/Users/casallas/Library/R/3.0/library/rjags/libs/rjags.so, 10): Library not loaded: /usr/local/lib/libjags.3.dylib
  Referenced from: /Users/casallas/Library/R/3.0/library/rjags/libs/rjags.so
  Reason: image not found
Error: package or namespace load failed for ‘rjags’

As you can see, rjags is expecting jags to be in /usr/local.

The solution

The easiest solution is to install rjags from source, using devtools::install_url with the following configure.args, as specified in rjags README:

devtools::install_url("http://sourceforge.net/projects/mcmc-jags/files/rjags/3/rjags_3-2.tar.gz",
                      args="--configure-args='--with-jags-include=/Users/casallas/homebrew/opt/jags/include/JAGS        
                                              --with-jags-lib=/Users/casallas/homebrew/opt/jags/lib'
                            "
                      )
@vmivm
Copy link

vmivm commented Feb 13, 2016

Hi!
thank you for your writing. that is really helpful.
but i still have trouble to load rjags, i think it is installed via homebrew successfully. so now i can see it(rjags) in the package section in the right below part of Rstudio.

BUT, I have no idea why i can't load rjags.
here is the error message, When i do 'library(rjags)'


Error in get(method, envir = home) :
lazy-load database '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rjags/R/rjags.rdb' is corrupt


can you give me a hand plz?

Many thanks. :)

@Ibrocas
Copy link

Ibrocas commented Feb 20, 2016

Good evening,

I installed jags from source as you suggested in the solution above but I get the following error:

Downloading package from url: http://sourceforge.net/projects/mcmc-jags/files/rjags/3/rjags_3-2.tar.gz
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
Error in if (!file.exists(file.path(pkg_path, "DESCRIPTION"))) { :
argument is of length zero
In addition: Warning messages:
1: In utils::untar(src, exdir = target, compressed = "gzip") :
‘/usr/bin/tar -xf '/var/folders/0b/xd0wy5jx0t1cd2tys9nktzyc0000gn/T//RtmpXIK3gv/file16e2866ff43.tar.gz' -C '/var/folders/0b/xd0wy5jx0t1cd2tys9nktzyc0000gn/T//RtmpXIK3gv/devtools16e761dfac8'’ returned error code 1
2: running command '/usr/bin/tar -tf '/var/folders/0b/xd0wy5jx0t1cd2tys9nktzyc0000gn/T//RtmpXIK3gv/file16e2866ff43.tar.gz'' had status 1
3: In min(slashes) : no non-missing arguments to min; returning Inf

I have been following all instructions. Thanks for giving me any suggestion :)

@Ibrocas
Copy link

Ibrocas commented Feb 20, 2016

Problem solved: the solution involves looking for version 4 (none of the other versions worked for me) as displayed here:

devtools::install_url("http://sourceforge.net/projects/mcmc-jags/files/rjags/4/rjags_4-4.tar.gz",
args="--configure-args='--with-jags-include=/Users/casallas/homebrew/opt/jags/include/JAGS
--with-jags-lib=/Users/casallas/homebrew/opt/jags/lib'
"
)

@edithelg
Copy link

edithelg commented Mar 2, 2017

Hi can you please help me with this??

Downloading GitHub repo rasmusab/bayesian_first_aid@master
from URL https://api.github.com/repos/rasmusab/bayesian_first_aid/zipball/master
Installing BayesianFirstAid
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ
--no-save --no-restore --quiet CMD INSTALL
'/private/var/folders/lj/0vlzq1w92r18dwbb2hkwygcm0000gn/T/RtmpC1O3eb/devtools109ad49ae6a91/rasmusab-bayesian_first_aid-d80c0fd'
--library='/Library/Frameworks/R.framework/Versions/3.3/Resources/library'
--install-tests

  • installing source package ‘BayesianFirstAid’ ...
    ** R
    ** inst
    ** tests
    ** preparing package for lazy loading
    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.3/Resources/library/rjags/libs/rjags.so':
    dlopen(/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rjags/libs/rjags.so, 10): Library not loaded: /usr/local/lib/libjags.4.dylib
    Referenced from: /Library/Frameworks/R.framework/Versions/3.3/Resources/library/rjags/libs/rjags.so
    Reason: image not found
    Error : package ‘rjags’ could not be loaded
    ERROR: lazy loading failed for package ‘BayesianFirstAid’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/BayesianFirstAid’
    Error: Command failed (1)

@luceromz
Copy link

luceromz commented Oct 5, 2017

Hi!

Im having this problem working with Yosemite 10.10.5

configure: error: "automatic detection of JAGS failed. Please supply the prefix for JAGS with the --with-jags-prefix option. See the README file for details."
ERROR: configuration failed for package 'rjags'

  • removing '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rjags'
  • restoring previous '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rjags'
    Installation failed: Command failed (1)

@lorenzwalthert
Copy link

lorenzwalthert commented Jan 4, 2018

thanks so much @Ibrocas, your solution worked for me.

@teefryingpan
Copy link

teefryingpan commented Mar 6, 2018

@luceromz I am still having that problem as well. Any solutions?

@JNavelski
Copy link

JNavelski commented Mar 25, 2018

@luceromz @teefryingpan

Operating system: MacOS 10.13.3
R Version: 3.4.4

I have installed rjags,using both the standard way of dowloading a package and through @Ibrocas comment, but for some reason I cannot get it to load the rjags package from my package library. There error code I am getting is:

library(rjags)
Error: package or namespace load failed for ‘rjags’:
.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.4/Resources/library/rjags/libs/rjags.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rjags/libs/rjags.so, 10): Library not loaded: /usr/local/lib/libjags.4.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rjags/libs/rjags.so
Reason: image not found

Can anyone offer some advice on how to call rjags? I have removed and reinstalled multiple times.

Thanks to everyone on the forum!

@CommonClimate
Copy link

CommonClimate commented Jun 6, 2018

Just wanted to thank you for taking the time to write this. Everything appears to be working, thanks to your instructions.

@SoniaGasmi
Copy link

SoniaGasmi commented Aug 7, 2018

Hi guys,
I am facing the same problem! did anyone find a solution? @luceromz @teefryingpan @JNavelski
Thanks!

@mellowish
Copy link

mellowish commented Oct 4, 2018

Has anyone successfully gotten this to work recently? I am also trying to load rjags on my mac and I swear that it was working fine with install.packages last week. Today, I am getting the following error when loading my library. None of the above solutions seemed to work. Any ideas?

Error: package or namespace load failed for ‘rjags’: .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.4/Resources/library/rjags/libs/rjags.so': dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rjags/libs/rjags.so, 10): Library not loaded: /usr/local/lib/libjags.4.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rjags/libs/rjags.so Reason: image not found

@Kumailwasif
Copy link

Kumailwasif commented Oct 14, 2018

It worked for me after I installed the standalone JAGS:

https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/

@th2018
Copy link

th2018 commented Jan 25, 2019

I tried to install the package with:
devtools::install_url("http://sourceforge.net/projects/mcmc-jags/files/rjags/3/rjags_3-15.tar.gz",
args="--configure-args='--with-jags-include=/Users/casallas/homebrew/opt/jags/include/JAGS
--with-jags-lib=/Users/casallas/homebrew/opt/jags/lib'
")

Then I got this:
(converted from warning) installation of package ‘/var/folders/nd/ndldk_zn24jg80m122j__9dm0000gn/T//Rtmpi0yBew/file22371c86add/rjags_3-15.tar.gz’ had non-zero exit status

I think there is something wrong with the .gz file?

@fahrenfort
Copy link

fahrenfort commented Mar 7, 2019

Same here, it worked for me after I installed the standalone JAGS, very easy solution:

https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/

@lucaspaolucci
Copy link

lucaspaolucci commented Jun 5, 2019

It worked for me after I installed the standalone JAGS:

https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/

Thanks, this helped me too!

@Luffy-wu
Copy link

Luffy-wu commented Jan 30, 2020

Thanks! the following works for me:

steps:

  1. From the following link, download the newest version of JAGS (like, JAGS-4.3.0.dmg) and install JAGS
    https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/
  2. Install rjags: in R
    install.packages("rjags")
  3. library(rjags)

@tonomuniz
Copy link

tonomuniz commented Jun 30, 2020

I was having similar problems to the previously mentioned and after I installed the standalone JAGS, it worked.

https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/

@IndrajeetPatil
Copy link

IndrajeetPatil commented Aug 8, 2020

The instructions don't work.

Running

> devtools::install_url("http://sourceforge.net/projects/mcmc-jags/files/rjags/3/rjags_3-2.tar.gz",
                       args="--configure-args='--with-jags-include=/Users/casallas/homebrew/opt/jags/include/JAGS        
                                               --with-jags-lib=/Users/casallas/homebrew/opt/jags/lib'
                             "
 )

gives me-

Downloading package from url: http://sourceforge.net/projects/mcmc-jags/files/rjags/3/rjags_3-2.tar.gz
Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
  cannot open URL 'http://sourceforge.net/projects/mcmc-jags/files/rjags/3/rjags_3-2.tar.gz'
Warning message:
1 components of `...` were not used.

We detected these problematic arguments:
* `args`

Did you misspecify an argument? 

@krakla
Copy link

krakla commented Jan 16, 2021

The instructions don't work.

Running

> devtools::install_url("http://sourceforge.net/projects/mcmc-jags/files/rjags/3/rjags_3-2.tar.gz",
                       args="--configure-args='--with-jags-include=/Users/casallas/homebrew/opt/jags/include/JAGS        
                                               --with-jags-lib=/Users/casallas/homebrew/opt/jags/lib'
                             "
 )

gives me-

Downloading package from url: http://sourceforge.net/projects/mcmc-jags/files/rjags/3/rjags_3-2.tar.gz
Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
  cannot open URL 'http://sourceforge.net/projects/mcmc-jags/files/rjags/3/rjags_3-2.tar.gz'
Warning message:
1 components of `...` were not used.

We detected these problematic arguments:
* `args`

Did you misspecify an argument? 

Same here :(

@slothlife07
Copy link

slothlife07 commented Jan 26, 2021

It worked for me after I installed the standalone JAGS:

https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/

Thank you, this worked well for me. The readme is actually helpful and simple -> no actual need for homebrew etc.

@changwn
Copy link

changwn commented Feb 10, 2021

It worked for me after I installed the standalone JAGS:
https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/

Thank you, this worked well for me. The readme is actually helpful and simple -> no actual need for homebrew etc.

Thank you. This solution is the easiest solution. It works after I install the standalone JAGS. No trobule to find the path of lib/include.

@mkclapp
Copy link

mkclapp commented Jul 10, 2021

Sorry to resurface this thread, I hope this is a quick fix!-- I just bought a new MacBook Air w/ M1 chip; for some reason my installed R packages didn't migrate over and I need to reinstall rjags. I'm receiving the error you describe above "configure: error: C++ compiler cannot create executables" but don't know my way around my computer well enough to understand your suggestion about finding the right compiler and specifying CC and CXX. Where exactly is this done? Thanks v much for any suggestion you can provide!

@mkclapp
Copy link

mkclapp commented Jul 10, 2021

Sorry to resurface this thread, I hope this is a quick fix!-- I just bought a new MacBook Air w/ M1 chip; for some reason my installed R packages didn't migrate over and I need to reinstall rjags. I'm receiving the error you describe above "configure: error: C++ compiler cannot create executables" but don't know my way around my computer well enough to understand your suggestion about finding the right compiler and specifying CC and CXX. Where exactly is this done? Thanks v much for any suggestion you can provide!

Update: Using the terminal I made a Makevars file in the ~/.R folder containing the text
CC=clang
CXX=clang++
And tried again to install rjags but received the same error:

xcrun: error: unable to load libxcrun (dlopen(/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib, 0x0005): could not use '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' because it is not a compatible arch). this error message is repeated several times
checking for pkg-config... no
configure: Attempting legacy configuration of rjags
checking for jags... /usr/local/bin/jags
checking for g++... g++
checking whether the C++ compiler works... no
configure: error: in /private/var/folders/sv/3zwcb1kj0s32rv6ky634dxx40000gn/T/Rtmp2YJdvZ/R.INSTALL235545c4ce2f/rjags': configure: error: C++ compiler cannot create executables See config.log' for more details
ERROR: configuration failed for package ‘rjags’

@barracuda156
Copy link

barracuda156 commented Nov 26, 2021

Cannot install rjags either. Solutions above do not work:

** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘rjags’:
.onLoad failed in loadNamespace() for 'rjags', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Users/svacchanda/Library/R/powerpc/4.1/library/00LOCK-rjags/00new/rjags/libs/rjags.so':
dlopen(/Users/svacchanda/Library/R/powerpc/4.1/library/00LOCK-rjags/00new/rjags/libs/rjags.so, 10): Symbol not found: __ZN4jags5Model12rngFactoriesB5cxx11Ev
Referenced from: /Users/svacchanda/Library/R/powerpc/4.1/library/00LOCK-rjags/00new/rjags/libs/rjags.so
Expected in: dynamic lookup

Error: loading failed
Execution halted
ERROR: loading failed

  • removing ‘/Users/svacchanda/Library/R/powerpc/4.1/library/rjags’
    Warning message:
    In i.p(...) :
    installation of package ‘/var/folders/rD/rDeCM6SDHv8daLCecrRmrU+++TI/-Tmp-//RtmpgawayR/file130455010bb8a/rjags_4-4.tar.gz’ had non-zero exit status

@peijianying
Copy link

peijianying commented Feb 21, 2022

MAC with M1 用不了,不用试了,建议换成window

@ViRb3
Copy link

ViRb3 commented Mar 12, 2022

Easiest way to install native arm64 jags:

brew install pkg-config jags
/Applications/RStudio.app/Contents/MacOS/RStudio
install.packages("rjags", type="source")

It is important to launch RStudio from a terminal and not the app directly, because otherwise the homebrew bin path will not be added to your PATH, and installation of rjags will fail.

@Taojun-Hu
Copy link

Taojun-Hu commented Apr 18, 2022

Thanks a lot. This works on my computer.

@mskb01
Copy link

mskb01 commented Apr 22, 2022

Unfortunately, I am having an issue with installing RJAGS on Mac OS Big Sur, 2018 Mac Pro, Intel I9.
Running R 4.1.1. I have installed JAGS and I am able to run that program independently.

I also worked through the devtools include option mentioned above but still no luck. Any thoughts?

Approach 1

>install.packages("rjags")
* installing *source* package ‘rjags’ ...
** package ‘rjags’ successfully unpacked and MD5 sums checked
** using staged installation
checking for pkg-config... /usr/local/bin/pkg-config
configure: Setting compile and link flags according to pkg-config
configure: Compile flags are -I/usr/local/include/JAGS
configure: Link flags are -L/usr/local/lib -ljags
checking for gcc... /usr/local/bin/gcc-11
checking whether we are using the GNU C compiler... no
checking whether /usr/local/bin/gcc-11 accepts -g... no
checking for /usr/local/bin/gcc-11 option to accept ISO C89... unsupported
checking for jags_version in -ljags... yes
checking version of JAGS library... OK
configure: creating ./config.status
config.status: creating src/Makevars
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/unix/zzz.R
** libs
/usr/local/bin/gcc-11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/JAGS   -I/usr/local/include   -fPIC  -Wall -g -O2  -c init.c -o init.o
/usr/local/bin/g++-11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/JAGS   -I/usr/local/include   -fPIC  -Wall -g -O2  -c jags.cc -o jags.o
/usr/local/bin/g++-11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/JAGS   -I/usr/local/include   -fPIC  -Wall -g -O2  -c parallel.cc -o parallel.o
/usr/local/bin/g++-11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o rjags.so init.o jags.o parallel.o -L/usr/local/lib -ljags -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/4.1/Resources/library/00LOCK-rjags/00new/rjags/libs
** R
** data
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘rjags’:
 .onLoad failed in loadNamespace() for 'rjags', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.1/Resources/library/00LOCK-rjags/00new/rjags/libs/rjags.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.1/Resources/library/00LOCK-rjags/00new/rjags/libs/rjags.so, 10): Symbol not found: __ZN4jags11SimpleRangeC1ERKSt6vectorIiSaIiEES5_
  Referenced from: /Library/Frameworks/R.framework/Versions/4.1/Resources/library/00LOCK-rjags/00new/rjags/libs/rjags.so
  Expected in: flat namespace
 in /Library/Frameworks/R.framework/Versions/4.1/Resources/library/00LOCK-rjags/00new/rjags/libs/rjags.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/rjags’

The downloaded source packages are in
	‘/private/var/folders/_3/8v09s_c91fs5myl646c2_ts80000gp/T/Rtmp0930vW/downloaded_packages’
Warning message:
In install.packages("rjags") :
  installation of package ‘rjags’ had non-zero exit status

Approach 2: Devtools

>devtools::install_url("http://sourceforge.net/projects/mcmc-jags/files/rjags/4/rjags_4-4.tar.gz",
                      args="--configure-args='--with-jags-include=/usr/local/include/JAGS 
                                                                 --with-jags-lib=/usr/local/opt/jags/lib'
                            ")

Downloading package from url: http://sourceforge.net/projects/mcmc-jags/files/rjags/4/rjags_4-4.tar.gz
✓  checking for file ‘/private/var/folders/_3/8v09s_c91fs5myl646c2_ts80000gp/T/Rtmpark1rv/remotes3785557112a/rjags/DESCRIPTION’ ...
─  preparing ‘rjags’:
✓  checking DESCRIPTION meta-information ...
─  cleaning src
─  running ‘cleanup’
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘rjags_4-4.tar.gz’
   
* installing *source* package ‘rjags’ ...
** using staged installation
checking for pkg-config... /usr/local/bin/pkg-config
configure: Setting compile and link flags according to pkg-config
configure: Compile flags are -I/usr/local/include/JAGS
configure: Link flags are -L/usr/local/lib -ljags
checking for gcc... /usr/local/bin/gcc-11
checking whether we are using the GNU C compiler... no
checking whether /usr/local/bin/gcc-11 accepts -g... no
checking for /usr/local/bin/gcc-11 option to accept ISO C89... unsupported
checking for jags_version in -ljags... yes
checking version of JAGS library... OK
configure: creating ./config.status
config.status: creating src/Makevars
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/unix/zzz.R
** libs
/usr/local/bin/g++-11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/JAGS   -I/usr/local/include   -fPIC  -Wall -g -O2  -c jags.cc -o jags.o
jags.cc: In function 'jags::SimpleRange makeRange(SEXP, SEXP)':
jags.cc:213:29: warning: catching polymorphic type 'class std::logic_error' by value [-Wcatch-value=]
  213 |     catch (std::logic_error except) {
      |                             ^~~~~~
/usr/local/bin/g++-11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/JAGS   -I/usr/local/include   -fPIC  -Wall -g -O2  -c parallel.cc -o parallel.o
/usr/local/bin/g++-11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o rjags.so jags.o parallel.o -L/usr/local/lib -ljags -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/4.1/Resources/library/00LOCK-rjags/00new/rjags/libs
** R
** data
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘rjags’:
 .onLoad failed in loadNamespace() for 'rjags', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.1/Resources/library/00LOCK-rjags/00new/rjags/libs/rjags.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.1/Resources/library/00LOCK-rjags/00new/rjags/libs/rjags.so, 10): Symbol not found: __ZN4jags11SimpleRangeC1ERKSt6vectorIiSaIiEES5_
  Referenced from: /Library/Frameworks/R.framework/Versions/4.1/Resources/library/00LOCK-rjags/00new/rjags/libs/rjags.so
  Expected in: flat namespace
 in /Library/Frameworks/R.framework/Versions/4.1/Resources/library/00LOCK-rjags/00new/rjags/libs/rjags.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/rjags’
Warning messages:
1: In i.p(...) :
  installation of package ‘/var/folders/_3/8v09s_c91fs5myl646c2_ts80000gp/T//Rtmpark1rv/file3781530638c/rjags_4-4.tar.gz’ had non-zero exit status
2: 1 components of `...` were not used.

We detected these problematic arguments:
* `args`

Did you misspecify an argument? 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment