Results 1 to 7 of 7

Thread: Installing rgl package in R

  1. #1
    Join Date
    Mar 2007
    Beans
    174
    Distro
    Ubuntu

    Installing rgl package in R

    Hi All,

    I'm trying to install rgl package for R and I get the following error

    checking for X... no
    configure: error: X11 not found but required, configure aborted.
    ERROR: configuration failed for package 'rgl'

    I notice that this is not only me, was anyone able to solve this problem?

    Thank you for your help
    Many people would sooner die than think. In fact they do. - B. Russell

  2. #2
    Join Date
    Mar 2007
    Beans
    174
    Distro
    Ubuntu

    Re: Installing rgl package in R

    I managed to install rgl with

    Code:
    sudo apt-get install r-cran-rgl
    However when I try to use it, for example

    >library(rgl)
    >example(plot3d)

    R creates plot, but the plot doesn't react in anyway, can't rotate or zoom or anything until I close it with rgl.close().

    Any suggestions or recommendations?
    Many people would sooner die than think. In fact they do. - B. Russell

  3. #3
    Join Date
    Mar 2007
    Beans
    174
    Distro
    Ubuntu

    Re: Installing rgl package in R

    After some digging around I found out that apparently there are some libraries are missing.
    This is the problem. rgl needs to work with (surprise) GL libraries and include files. With SuSE 9.0 the thing you need is
    > rpm -qf /usr/include/GL/gl.h
    How can I translate it to ubuntu? What libraries do I need and how to download them?
    Many people would sooner die than think. In fact they do. - B. Russell

  4. #4
    Join Date
    Feb 2008
    Beans
    4

    Re: Installing rgl package in R

    Late, but for the record here is a potential solution:
    Try, in bash:
    $sudo apt-get install libX11-dev freeglut3 freeglut3-dev

    Then in R:
    >install.packages(rgl)

    This got me through the installation, although call to rgl produced a segfault on my virtual ubuntu 9.1.

  5. #5
    Join Date
    Oct 2010
    Beans
    2
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Installing rgl package in R

    Thanks! I've got the same problem trying to install the rgl package.

    I solved installing "xserver-xorg-dev" and then following the kirillt post.

    Cheers

  6. #6
    Join Date
    Oct 2012
    Beans
    1

    Re: Installing rgl package in R

    In my case R was not built with X support, and I was also missing some openGL libraries. The info I needed was in the README inside the unzipped tarball for rgl. But rgl cleaned up after failing the install, and deleted the README, so I never new the README was there until I manually untarr'ed the tarball and looked inside it. (Error msg from install.packages("rgl") showed where the tarball was.)

    I needed to do the following:
    1. Rebuild R with X support. Add --with-X to the configure line when building See app.B.1 "Configuration Options" of R Installation & Admin manual
    ./configure --with-tcltk --with-system-zlib --with-system-bzlib --enable-R-shlib --with-x
    (note: might need --x-includes=DIR --x-libraries=DIR . Seemed to work without these for me, presumably because they are in the default location)
    make
    make check
    make install
    2. Install missing openGL libraries (I'm on RHEL...use apt get on other systems):
    yum install mesa-libGL-devel mesa-libGLU-devel libpng-devel

    3. Install rgl
    > install.packages("rgl")

    HTH

  7. #7
    Join Date
    Feb 2007
    Beans
    23,211
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Installing rgl package in R


    From the Ubuntu Forums Code of Conduct.
    If a post is older than a year or so and hasn't had a new reply in that time, instead of replying to it, create a new thread. In the software world, a lot can change in a very short time, and doing things this way makes it more likely that you will find the best information. You may link to the original discussion in the new thread if you think it may be helpful.
    Thread closed.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •