I have installed r with Homebrew and installed the INLA package for spatial analysis.
Unfortunately when using this module I get the following error:
dyld: Library not loaded: /usr/local/opt/xz/lib/liblzma.5.dylib
Referenced from: /usr/local/Cellar/r/3.4.1_1/lib/R/lib/libR.dylib
Reason: Incompatible library version: libR.dylib requires version 8.0.0 or later, but liblzma.5.dylib provides version 6.0.0
I have already installed the xz library with Homebrew which installs liblzma, otool -L /usr/local/lib/liblzma.5.dylib returns:
/usr/local/lib/liblzma.5.dylib:
/usr/local/opt/xz/lib/liblzma.5.dylib (compatibility version 8.0.0, current version 8.3.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)
This seem to indicate that I have the required version despite the exception raised by r.
Any help solving this issue will be deeply appreciated.