title: Installing rgl on Ubuntu and Mac: X11 not found
body: <p>I have seen this question here: <a href="https://stackoverflow.com/questions/9878693/error-in-loading-rgl-package-with-mac-os-x">Error in loading rgl package with Mac OS X</a> but there is no mentioning about installation error, which is my case. I cannot install <code>rgl</code> package, using this command in <code>R</code>:</p>
  
  <pre><code>source("http://bioconductor.org/biocLite.R")
  biocLite("rgl")
  </code></pre>
  
  <p>The following error is displayed:</p>
  
  <blockquote>
    <p>configure: error: X11 not found but required, configure aborted.
        ERROR: configuration failed for package ‘rgl’
        * removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgl’</p>
  </blockquote>
  
  <p>I checked this address <code>/Library/Frameworks/R.framework/Versions/3.2/Resources/library</code> and there is no <code>rgl</code> folder, so I cannot delete <code>aglrgl.so</code> (or <code>rgl.so</code>), which is the answer to the above-mentioned question. Can you please help me with this installation problem? Thanks.</p>