[R] installing packages over ssh without X forwarding

Duncan Murdoch murdoch.duncan at gmail.com
Fri Jul 9 16:35:11 CEST 2010


On 09/07/2010 7:37 AM, petr at orbit.umbr.cas.cz wrote:
> Hi,
> Is it possible to install packages without the testing if installed
> package can be loaded?
> I need to install bunch of packages on multiple computers over ssh. Some
> packages witch interact with X11 display cannot be installed in this way.
> for example after:
> > install.packages('cairoDevice',dep=T)
> I get
> (...)
> *** installing help indices
> ** building package indices ...
> ** testing if installed package can be loaded
> Error : .onLoad failed in loadNamespace() for 'cairoDevice', details:
>   call: fun(...)
>   error: GDK display not found - please make sure X11 is running
> ERROR: loading failed
> * removing ‘/usr/local/lib64/R/library/cairoDevice’
> * restoring previous ‘/usr/local/lib64/R/library/cairoDevice’
>
> The downloaded packages are in
>         ‘/tmp/Rtmpk1XxTl/downloaded_packages’
> Updating HTML index of packages in '.Library'
> Warning message:
> In install.packages("cairoDevice", dep = T) :
>   installation of package 'cairoDevice' had non-zero exit status
>
> When I connect with remote computer using ssh -X root at nod1 to enable X11
> forwarding then installation works without problems. This would however
> require manually connect with each administred computer a do the
> installation. cssh which I use now to install packages on multiple
> computers does not enable X11 forwarding. I have also tested installation
> using R CMD INSTALL with --no-test-load options but the packages are
> loaded unsuccesfully anyway. So is it possible to turn of package testing?
> Petr

Yes, use the "--no-test-load" option to R CMD INSTALL, which you can 
pass through the INSTALL_opts argument to install.packages().

Duncan Murdoch



More information about the R-help mailing list