I am running R in OSX Mojave and am getting a following error when loading any packages with mgcv dependency;
library(Seurat)
Error: package or namespace load failed for ‘Seurat’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/akh/Documents/R_lib_4/mgcv/libs/mgcv.so':
dlopen(/Users/akh/Documents/R_lib_4/mgcv/libs/mgcv.so, 6): Symbol not found: _libintl_dgettext
Referenced from: /Users/akh/Documents/R_lib_4/mgcv/libs/mgcv.so
Expected in: /usr/local/Cellar/r/4.0.4_1/lib/R/lib/libR.dylib
in /Users/akh/Documents/R_lib_4/mgcv/libs/mgcv.so
I have a gettext installed by brew;
brew info gettext
gettext: stable 0.21 (bottled)
GNU internationalization (i18n) and localization (l10n) library
https://www.gnu.org/software/gettext/
/usr/local/Cellar/gettext/0.21 (1,959 files, 19MB) *
Poured from bottle on 2021-03-18 at 12:03:19
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gettext.rb
License: GPL-3.0-or-later
and including libintl.8.dylib
/usr/local/Cellar/gettext/0.21/lib/libintl.8.dylib
I can't quite pinpoint bottom of the cause, and I really appreciate any inputs to fix this issue.
R version 4.0.4 (2021-02-15) -- "Lost Library Book"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin18.7.0 (64-bit)
~ sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.6
BuildVersion: 18G8022
updating to the latest Brew version of r 4.0.4_2 and getting rid of /Library/Frameworks/R.framework cured it.