I am on a Mac OS 12.4 Monterey. I have the latest XCode and latest XQuartz.
I fully uninstalled my previous version of R.
I installed R-4.2.1 (not RStudio, but gui R).
I am trying to install the package spam, and have tried 1) installing the binary, which appears to install with no issued, 2) installing from source, which also appears to have no issue. However, when I try to either load the package from the Package Manager or with library(spam), I get an error message that R is looking for the previous R.framework/Versions/4.1:
library(spam)
Error: package or namespace load failed for ‘spam’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/nkiang/SW/Rpackages/dotCall64/libs/dotCall64.so':
dlopen(/Users/nkiang/SW/Rpackages/dotCall64/libs/dotCall64.so, 0x0006): Library not loaded: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libgfortran.5.dylib
Referenced from: /Users/nkiang/SW/Rpackages/dotCall64/libs/dotCall64.so
Reason: tried: '/Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libgfortran.5.dylib' (no such file), '/usr/local/lib/libgfortran.5.dylib' (no such file), '/usr/lib/libgfortran.5.dylib' (no such file)
My .libPaths() are:
[1] "/Users/nkiang/SW/Rpackages"
[2] "/Users/nkiang/Library/R/x86_64/4.2/library"
[3] "/Library/Frameworks/R.framework/Versions/4.2/Resources/library"
Is this a bug in the spam package?