Can not save svg file in mac (Solved)
Closed this issue · 0 comments
wenlong-liu commented
When I run ggsave(), I received this error:
Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/gdtools/libs/gdtools.so': dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/gdtools/libs/gdtools.so, 6): Library not loaded: /opt/X11/lib/libcairo.2.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/gdtools/libs/gdtools.so Reason: image not found
After googling it, this is because the maxos lacks of some certain font system in Windows. Here is what I did to fix it.
-
- install homebrew;
-
- brew install cairo in Terminal
-
- install.packages(gdtools)