Skip to content

Scott Jackson

Installing the 'rgl' Package on Mac OS X

1 min read

This is going to be a really short one that I hope helps out some R users.

You might find when installing a package in R that you get something to the effect of

1package 'rgl' is not available

If you try to install it directly:

3# installation failed, X11 is not available

The first step is to install XQuartz.

Then, because the libraries and headers aren't installed to a location that rgl's installation script looks for:

1options(configure.args = "--x-includes=/opt/X11/include --x-libraries=/opt/X11/lib")

This should get you to where you need to be. If not, please reach out my Twitter handle: @scottmmjackson and let me know.