[R] Problems in package management after Linux system upgrade

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Apr 5 19:18:22 CEST 2006


On Wed, 5 Apr 2006, Paul Johnson wrote:

> I upgraded from Fedora Core 4 to Fedora Core 5 and I find a lot of
> previously installed packages won't run because shared libraries or
> other system things have changed "out from under" the installed R
> libraries.  I do not know for sure if the R version now from
> Fedora-Extras (2.2.1) is exactly the same one I was using in FC4.
>
> I see problems in many packages. Example, Hmisc:
> 	unable to load shared library '/usr/lib/R/library/Hmisc/libs/Hmisc.so':
>  libgfortran.so.0: cannot open shared object file: No such file or directory
> Error in library(Hmisc) : .First.lib failed for 'Hmisc'

You have a later compiler, gcc 4.1.0 not 4.0.x.  Is there no 
back-compatibility package with the older compiler's runtime?
(I would compile gcc 4.0.3 and install that file manually, but that's
not for those unused to building gcc.)

> If I manually do a re-install, then Hmisc and the other packages are fine.
>
> I ?THINK? that if I had been using version 2.2.0, and now I have
> 2.2.1, then the checkBuilt option would force a rebuild on all
> packages. Right?

Sorry, no.  That is just a patchlevel change.  The docs say

checkBuilt: If 'TRUE', a package built under an earlier minor version
           of R is considered to be 'old'.

and the minor version is '2' (the second '2').

> I'm pasting in below the script that I run nightly to update all
> packages and install any new ones in CRAN.  Can anybody suggest
> changes that might cause a rebuild of packages that need rebuilding?

Well, we are in alpha of 2.3.0, so what I would do is to install 2.3.0 
alpha and then your script will do all the updates for you. You can then
remove it when a 2.3.0 RPM is available.


> ## PJ 2005-11-05
> options(repos = "http://cran.cnr.berkeley.edu/")
>
> #failPackages is the "black list".  Things get inserted for various reasons
>
> #rejected because they don't build on my system as of July, 2005, or
> are obviously not needed
> failPackages1 <-
> c("BRugs","tclkt2","cyclones","rpvm","ncdf","gtkDevice","gap","gnomeGUI","mimR","pathmix","rcdd","rgdal","rpvm","Rmpi","RQuantLib","RMySQL",
> "RNetCDF","RODBC","ROracle","rsprng","RWinEdt","taskPR")
>
> #rejected because I subjectively think we don't need them
> failPackages2 <-
> c("aaMI","AlgDesign","bim","caMassClass","CGIwithR","CDNmoney","clac","clim.pact","compositions","cyclones","hapassoc","haplo.score","haplo.stats","hapsim","httpRequest",
> "labdsv","kza","LMGene","Malmig","magic","negenes","oz","papply","spe","wavethresh","waveslim","tdthap")
>
>
> failPackages3 <- c("rcom","Rlsf")
>
> #put the 3 sets of rejects together
> failPackages <- union(failPackages1,union(failPackages2,failPackages3))
>
> #list of all currently installed packages
> installedPackages <- rownames (installed.packages() )
>
> #do any installed packages need removal because they are on the blacklist?
> needRemoval <-  installedPackages %in% failPackages
>
> # remove any blacklisted packages if they are already installed.
> if (sum(needRemoval) >0)   remove.packages(installedPackages[needRemoval] )
>
>
> #update the ones you want to keep
> update.packages(ask=F, checkBuilt=T)
>
> #get list of all new packages on CRAN
> theNew <- new.packages()
>
>
> #do any of the new packages belong to the black list?
> shouldFail <- theNew %in% failPackages
>
> #install non blacklisted packages that are in theNew list
> if (sum(!shouldFail) > 0) install.packages( theNew[!shouldFail],dependencies=T)
>
> # VGAM is not in CRAN yet, but Zelig will use it.
>
> if ( "VGAM" %in% installedPackages)
>  update.packages(repos="http://www.stat.auckland.ac.nz/~yee",ask=F) else
>  install.packages("VGAM", repos="http://www.stat.auckland.ac.nz/~yee")
>
> --
> Paul E. Johnson
> Professor, Political Science
> 1541 Lilac Lane, Room 504
> University of Kansas
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list