Can't load X11 in R after OS X Yosemite upgrade
Execute the following in a terminal window:
locate libSM.6.dylib
or do it from an R console:
system("locate libSM.6.dylib")
On my Yosemite install it's in /opt/X11/lib/libSM.6.dylib
.
If your setup is similar, then:
sudo ln -s /usr/X11 /opt/X11
should help fix this temporarily, but I'd keep looking for a Yosemite R package (since that will accommodate all the changes Apple made to the filesystem structure).
RStudio on Mac OS X 10.13 getting X11 is not available error when trying to use fix()
Putting this as an answer in case other find this.
This particular issue was due to using Homebrew R on macOS which (at the time of this Q) didn't compile with X11 support.
I should have had the OP execute capabilities()
first. That would have displayed something like:
## jpeg png tiff tcltk X11 aqua http/ftp
## TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## sockets libxml fifo cledit iconv NLS profmem
## TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## cairo ICU long.double libcurl
## TRUE TRUE TRUE TRUE
If X11
is FALSE
, then you have an R installation w/o support for X11 and should use the macOS R distribution from CRAN.
Error in loading rgl package with Mac OS X
I was having this problem with rgl 0.93.996 on OSX 10.9.2, but then after reinstalling several times I saw "Installing rgl - error: X11 not found but required, configure aborted"
A quick search took me here https://stat.ethz.ch/pipermail/r-sig-mac/2012-March/009077.html
Then I was finally able to get it to work by downloading XQuartz https://www.xquartz.org So it was X11 that was the problem in my case.
Installing rgl on Ubuntu and Mac: X11 not found
All the mentioned answers are correct; however, none is for Mac.
In my case (I am a Mac user), I solved the problem by installing XQuartz and restarting R.
Related Topics
Doing a Plyr Operation on Every Row of a Data Frame in R
Using Predict with a List of Lm() Objects
Vectorize a Product Calculation Which Depends on Previous Elements
Passing List of Named Parameters to Function
Highlight All Connected Paths from Start to End in Sankey Graph Using R
Labeling Center of Map Polygons in R Ggplot
Cannot Install R Packages in Jupyter Notebook
Adding Legend to Ggplot When Lines Were Added Manually
Storing Specific Xml Node Values with R's Xmleventparse
Reshape Wide to Long with Character Suffixes Instead of Numeric Suffixes
How to Create, Structure, Maintain and Update Data Codebooks in R
How to Use Outlier Tests in R Code
Mgcv: How to Set Number And/Or Locations of Knots for Splines
Force Ggplot2 Scatter Plot to Be Square Shaped
Check If Each Row of a Data Frame Is Contained in Another Data Frame
How to Display the Median Value in a Boxplot in Ggplot
Glpk: No Such File or Directory Error When Trying to Install R Package