power
power

Reputation: 1760

Do I really need X11 for R on Mac?

R version 3.5.2

macOS version 10.14.2 mojave

Whenever installing an R, package I see the following warning:

Warning message:
In doTryCatch(return(expr), name, parentenv, handler) :
  unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so':
  dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Library not loaded: /opt/X11/lib/libSM.6.dylib
  Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so
  Reason: image not found

Everything seems to work fine. ggplot2 plots get drawn,...etc.

Do I really need to install X11 from XQuartz? Is anything actually broken?

Does it "unlock" anything?

Upvotes: 7

Views: 4490

Answers (2)

András Aszódi
András Aszódi

Reputation: 9660

For those of us who do not have (or do not want to have) an extra package management system like Homebrew on their Macs: you can download a "real" macOS pkg package for XQuartz from the XQuartz site. Then you just install it like any other Mac package (hint: double-click on its icon in the Downloads folder :-) ).

Installation fixes the R problem the OP asked about (tried on Big Sur).

Upvotes: 1

Ines de Santiago
Ines de Santiago

Reputation: 91

this may work:

brew install --cask xquartz

Upvotes: 4

Related Questions