[R] installing "rgl" package

Duncan Murdoch murdoch.duncan at gmail.com
Sun Nov 26 21:12:34 CET 2017

On 26/11/2017 3:05 PM, Santosh wrote:
> Hi Rxperts,
> I tried with r-cran-rgl (based on the default installation of Ubuntu) 
> with reinstalled rgl package from R-forge.. I get the missing GL/gl.h 
> header. Didn't reinstall Mesa libraries per recommendations of Duncan.

None of your messages have indicated that the header is missing.  You're 
missing the library.  According to one of your earlier messages, it 
sounded as though the missing file is 

Duncan Murdoch
> * installing *source* package ‘rgl’ ... ** package ‘rgl’ successfully 
> unpacked and MD5 sums checked checking for gcc... gcc -std=gnu99 
> checking whether the C compiler works... yes checking for C compiler 
> default output file name... a.out checking for suffix of executables... 
> checking whether we are cross compiling... no checking for suffix of 
> object files... o checking whether we are using the GNU C compiler... 
> yes checking whether gcc -std=gnu99 accepts -g... yes checking for gcc 
> -std=gnu99 option to accept ISO C89... none needed checking how to run 
> the C preprocessor... gcc -std=gnu99 -E checking for gcc... (cached) gcc 
> -std=gnu99 checking whether we are using the GNU C compiler... (cached) 
> yes checking whether gcc -std=gnu99 accepts -g... (cached) yes checking 
> for gcc -std=gnu99 option to accept ISO C89... (cached) none needed 
> checking for libpng-config... yes configure: using libpng-config 
> configure: using libpng dynamic linkage checking for X... libraries , 
> headers checking GL/gl.h usability... no checking GL/gl.h presence... no 
> checking for GL/gl.h... no checking GL/glu.h usability... no checking 
> GL/glu.h presence... no checking for GL/glu.h... no configure: error: 
> missing required header GL/gl.h ERROR: configuration failed for package 
> ‘rgl’ * removing ‘/data/R/lib/rgl’ Warning in install.packages : 
> installation of package ‘rgl’ had non-zero exit status
> On Fri, Nov 24, 2017 at 3:45 PM, Santosh <santosh2005 at gmail.com 
> <mailto:santosh2005 at gmail.com>> wrote:
>     Hi Duncan,
>     Thanks for the suggestions. How do I uninstall mesa related
>     installations? Do I need to uninstall all of "mesa" or only the
>     specific ones?
>     Santosh
>     On Fri, Nov 24, 2017 at 3:05 PM, Duncan Murdoch
>     <murdoch.duncan at gmail.com <mailto:murdoch.duncan at gmail.com>> wrote:
>         On 24/11/2017 5:45 PM, Dirk Eddelbuettel wrote:
>             On 24 November 2017 at 11:30, Santosh wrote:
>             | Hi All, Duncan, Rolf, Ista, DIrk,
>             |
>             | Thanks for the suggestions and I tried all of them (as
>             suggested by Duncan,
>             | Rolf, Ista and Dirk)... I still get similar error as
>             before while
>             | installing 'rgl' package.. I also tried to manually
>             configure "rgl" and got
>             | an error message (please see below for the verbatim
>             output).  Would highly
>             | any further ideas/suggestions!
>             |
>             | *In my system, "GL" library is present under
>             "/usr/include/GL"*
>             |
>             | Here are the libraries available (as suggested by Rolf)
>             |
>             | After installing some of them, I continue to get the same
>             error message,
>             | please below the output messages in config.log after I ran
>             "./configure")
>             |
>             |
>             | "ii  r-cran-rgl                            0.93.996-1
>             |         amd64        GNU R package for three-dimensional
>             visualisation
>             | using OpenGL"
>             That means you _have_ the rgl package installed, and can
>             stop everything you
>             are doing.
>             You do _not_ need to install it from source via R. You have
>             it from Ubuntu.
>         Actually the version on CRAN is pretty old, so I'd recommend
>         people do install it from source, getting the source from
>         R-forge.  Since that is a development site the quality varies
>         over time, but right at this minute I would say it is better
>         than the CRAN version.
>         Re Santosh's error messages:  it looks as though the Mesa
>         installation is messed up.  I'd recommend uninstalling it,
>         making sure there's no remnant of Mesa anywhere, then
>         reinstalling it.
>         Duncan Murdoch

More information about the R-help mailing list