To install rgl you need some system libraries that must be installed before. The rgl package index page contains important information:
SystemRequirements: OpenGL, GLU Library, zlib (optional), libpng (>=1.2.9, optional), FreeType (optional)
As soon as we find out that OpenGL and the GLU Library are mandologues, we need to check whether they are present or not in the system. One way is to read the rgl installation log. If these lines appear:
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
This means that the GLU Library missing and needs to be installed. For example, on Ubuntu we can run:
sudo apt-get install libglu1-mesa-dev
In RedHat, it will be:
yum install Mesa-devel
This will set the GLU Library headers. And we can run again:
install.packages("rgl", dependencies = TRUE)
user3710546
source share