I have installed Cairo package in my R studio but i am unable to load it. I have M1 pro macbook.
library(Cairo)
Error: package or namespace load failed for ‘Cairo’:
.onLoad failed in loadNamespace() for 'Cairo', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Cairo/libs/Cairo.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Cairo/libs/Cairo.so, 0x0006): Library not loaded: /opt/X11/lib/libXrender.1.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Cairo/libs/Cairo.so
Reason: tried: '/opt/X11/lib/libXrender.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/X11/lib/libXrender.1.dylib' (no such file), '/opt/X11/lib/libXrender.1.dylib' (no such file), '/usr/lib/libXrender.1.dylib' (no such file, not in dyld cache)