1
votes

I am installing emojifont package. The package installs properly however when I try to call it through the library function I get the following error

Error: package or namespace load failed for ‘emojifont’: .onLoad failed in loadNamespace() for 'sysfonts', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sysfonts/libs/sysfonts.so': dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sysfonts/libs/sysfonts.so, 6): Library not loaded: /opt/X11/lib/libfreetype.6.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/sysfonts/libs/sysfonts.so Reason: image not found

1
See this and this. Would suggest posting it here as an answer if it solves your issue.NelsonGon

1 Answers

0
votes

What ended up working for me was installing XQuartz. I had this problem with both emojifont and sysfonts until I installed XQuartz and then both loaded without problems. I can't tell you much about what XQuartz is doing but it seems to be needed for the compatibility between MacOS and these packages.

Other people with this problem seemed to be having issues with their sysfonts install (like it needed to be updated, etc.) but that didn't work for me, instead I got an error when using trying to load both the sysfonts and the emojifont package. If you look at this line in the error "Library not loaded: /opt/X11/lib/libfreetype.6.dylib", that seems to be missing in the error message of people with only the sysfonts problem.

Hope this saves someone the 2 hours I just spent searching!