Skip to content

Updating packages after install of r-base 2.6.2: cant update rgl

6 messages · Michael Friendly, Dirk Eddelbuettel, Johannes Ranke

#
Hi

I just upgraded my R from stabel/etch from 2.4.x to 2.6.2 via

sudo apt-get install r-base
which worked fine, installing all dependencies

 From R, as root, I did

update.packages()

but a number of packages packages failed to install, either for missing 
gfortran
or missing dependencies.

Warning messages:
1: In install.packages(update[instlib == l, "Package"], l, contriburl = 
contriburl,  :
  installation of package 'maptools' had non-zero exit status
2: In install.packages(update[instlib == l, "Package"], l, contriburl = 
contriburl,  :
  installation of package 'mvtnorm' had non-zero exit status
3: In install.packages(update[instlib == l, "Package"], l, contriburl = 
contriburl,  :
  installation of package 'lmtest' had non-zero exit status
4: In install.packages(update[instlib == l, "Package"], l, contriburl = 
contriburl,  :
  installation of package 'multcomp' had non-zero exit status
5: In install.packages(update[instlib == l, "Package"], l, contriburl = 
contriburl,  :
  installation of package 'cluster' had non-zero exit status
6: In install.packages(update[instlib == l, "Package"], l, contriburl = 
contriburl,  :
  installation of package 'KernSmooth' had non-zero exit status
7: In install.packages(update[instlib == l, "Package"], l, contriburl = 
contriburl,  :
  installation of package 'mgcv' had non-zero exit status
 ...

OK, I installed r-base-dev to get gfortran and other dependencies, then 
tried
update.packages() again.  This time only rgl failed, complaining about 
missing X11:

trying URL 'http://probability.ca/cran/src/contrib/rgl_0.77.tar.gz'
Content type 'application/x-tar' length 803692 bytes (784 Kb)
opened URL
==================================================
downloaded 784 Kb

* Installing *source* package 'rgl' ...
checking for gcc... gcc -std=gnu99
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 ANSI C... 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 ANSI C... (cached) none needed
checking for libpng-config... yes
configure: using libpng-config
configure: using libpng dynamic linkage
checking for X... no
configure: error: X11 not found but required, configure aborted.
ERROR: configuration failed for package 'rgl'
** Removing '/usr/lib/R/site-library/rgl'
** Restoring previous '/usr/lib/R/site-library/rgl'

The downloaded packages are in
        /tmp/RtmpSFCuUT/downloaded_packages
Warning message:
In install.packages(update[instlib == l, "Package"], l, contriburl = 
contriburl,  :
  installation of package 'rgl' had non-zero exit status

Finally, I tried to install r-cran-rgl, but with no joy:

euclid:~# apt-get install r-cran-rgl
Reading package lists... Done
Building dependency tree... Done
r-cran-rgl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 267 not upgraded.

Can anyone suggest what is wrong and how to fix it?

thanks,
-Michael
#
Hi Michael,

* Michael Friendly <friendly at yorku.ca> [080409 22:00]:
I suppose you put some CRAN mirror into your /etc/apt/sources.list?
Yes, you need to explicitly upgrade r-base-dev, too, if you want to
install packages from CRAN.
 
...
Ok, I just did this on one of my etch boxes with CRAN R (and X
installed):

  cecking for X... libraries , headers
  checking GL/gl.h usability... yes
  checking GL/gl.h presence... yes
  checking for GL/gl.h... yes
  checking GL/glu.h usability... yes
  checking GL/glu.h presence... yes
  checking for GL/glu.h... yes
  checking for glEnd in -lGL... yes
  checking for gluProject in -lGLU... yes
  configure: creating ./config.status
  config.status: creating src/Makevars

So it works over here... On another box, without OpenGL, it fails, as
one would expect. On a third box, where I have no X installed, it fails, 
too, with exactly the error message you quoted above.

Could you give us the output of

    apt-cache policy xserver-xorg-core

or just tell us if you have Xorg installed?

Best regards,

Johannes

  
    
#
Thanks Johannes

See the tests below.
Johannes Ranke wrote:
cat /etc/apt/sources.list
#deb file:///cdrom/ sarge main

deb http://debian.yorku.ca/debian/ stable main
deb-src http://debian.yorku.ca/debian/ stable main
deb http://debian.yorku.ca/debian-security stable/updates main
deb http://security.debian.org/ stable/updates main
# testing
deb http://debian.yorku.ca/debian/ testing main
# CRAN has newer stable than debian.yorku.ca
deb http://cran.R-project.org/bin/linux/debian stable/
Yes, I do:
 apt-cache policy xserver-xorg-core
xserver-xorg-core:
  Installed: 2:1.1.1-21
  Candidate: 2:1.1.1-21etch4
  Version table:
     2:1.3.0.0.dfsg-12 0
        200 http://debian.yorku.ca testing/main Packages
     2:1.1.1-21etch4 0
        900 http://debian.yorku.ca stable/main Packages
     2:1.1.1-21etch3 0
        900 http://debian.yorku.ca stable/updates/main Packages
        900 http://security.debian.org stable/updates/main Packages
 *** 2:1.1.1-21 0
        100 /var/lib/dpkg/status

  
    
#
Michael,

I haven't had time to follow this closely but it seems that you that 
reckon that because
	a) you have (or had) r-cran-rgl installed
you should be able to 
        b) build either r-cran-rgl, or rgl
which is not true. We differentiate between Depends (to run) and
Build-Depends (to compile and link).

What you may need is a simple 
        sudo apt-get build-dep r-cran-rgl
which should give you everything needed to build rgl (even if you do not turn
it into a local .deb)

I may have misunderstood, in which case I apologize for adding further
confusion. 

Hth. Dirk

--
Three out of two people have difficulties with fractions.
#
Hi Dirk and Michael,
yes, probably just xserver-xorg-dev is missing, but your suggestion is
much better:
Right, if newer rgl versions have not added dependencies not present in
r-cran-rgl from etch.
On the contrary, I think you are right on!

Johannes
#
Dirk Eddelbuettel wrote:
Worked like a charm.  Thanks for your help.
-Michael