radian
radian copied to clipboard
load failed for ‘grDevices’ in dyn.load
Output from radian --version:
radian version: 0.5.9
r executable: /Library/Frameworks/R.framework/Resources/bin/R
r version: 4.0.3
python executable: /usr/local/opt/[email protected]/bin/python3.9
python version: 3.9.1
When radian starts up I'm getting these error messages:
Error: package or namespace load failed for ‘grDevices’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/grDevices/libs/grDevices.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/grDevices/libs/grDevices.so, 6): Symbol not found: __cg_png_create_info_struct
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /usr/local/lib/libPng.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Error: package or namespace load failed for ‘graphics’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/grDevices/libs/grDevices.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/grDevices/libs/grDevices.so, 6): Symbol not found: __cg_png_create_info_struct
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /usr/local/lib/libPng.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Error: package or namespace load failed for ‘stats’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/grDevices/libs/grDevices.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/grDevices/libs/grDevices.so, 6): Symbol not found: __cg_png_create_info_struct
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /usr/local/lib/libPng.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
During startup - Warning messages:
1: package ‘grDevices’ in options("defaultPackages") was not found
2: package ‘graphics’ in options("defaultPackages") was not found
3: package ‘stats’ in options("defaultPackages") was not found
R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Platform: x86_64-apple-darwin17.0 (64-bit)
If I don't use radian - R starts without any error messages and I can load packages without difficulty. /Library/Frameworks/R.framework/Versions/4.0/Resources/library/grDevices/libs/grDevices.so exists - I can see it in my file system - I'm not sure why radian can't see it:
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/grDevices/libs dir total 5.9M -rwxrwxr-x 1 root 5.6M Oct 10 20:32 cairo.so -rwxrwxr-x 1 root 325K Oct 10 20:32 grDevices.so
Appreciate any pointers or next steps to try to get radian running again - thanks.
Could you run
otool -L /Library/Frameworks/R.framework/Versions/4.0/Resources/library/grDevices/libs/grDevices.so
And how did you install R?
Could you run
otool -L /Library/Frameworks/R.framework/Versions/4.0/Resources/library/grDevices/libs/grDevices.so
otool -L /Library/Frameworks/R.framework/Versions/4.0/Resources/library/grDevices/libs/grDevices.so
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/grDevices/libs/grDevices.so:
grDevices.so (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1894.10.126)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
/Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib (compatibility version 4.0.0, current version 4.0.3)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1673.126.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 52.0.0)
/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 1348.12.4)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1673.126.0)
/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
And how did you install R?
Using the package from: https://cran.r-project.org/bin/macosx/
I've tried completely removing R and re-installing - still no luck with running Radian - same problem and error messages as above. R runs fine. Could it be an issue with Python? How would I track that down?
After periodic attempts to track down this issue, I find that if I run radian as an admin (sudo radian) everything is fine. Radian can see the packages. I find this behavior curious since when I run plain R from a terminal window I don't need to sudo in order for the default / base packages to be used.
Did you install libpng via homebrew? It seems that radian was trying to locate it and find a version under /usr/local/
.
Here's are the sim links in my /usr/local libpng files
libpng.a -> ../Cellar/libpng/1.6.37/lib/libpng.a
libpng.dylib -> ../Cellar/libpng/1.6.37/lib/libpng.dylib
libpng16.16.dylib -> ../Cellar/libpng/1.6.37/lib/libpng16.16.dylib
libpng16.a -> ../Cellar/libpng/1.6.37/lib/libpng16.a
libpng16.dylib -> ../Cellar/libpng/1.6.37/lib/libpng16.dylib