On Tue, 24 Oct 2006, Dirk Eddelbuettel wrote: > > On 24 October 2006 at 15:47, Van Campenhout Bjorn wrote: > | I am running R on ubuntu dapper. The version that is in the ubuntu > | repos is 2.2.1, so I decided to upgrade by adding > | > | deb http://cran.R-project.org/bin/linux/ubuntu dapper/ > | > | to my sources.list, as advised on the web page. After sudo apt-get > | update and upgrade, I have version 2.3.1. However, when I try to load > | the library 'foreign', I get the following error: > | > | Error in dyn.load(x, as.logical(local), as.logical(now)): > | Unable to load shared library > | '/usr/lib/R/library/foreign/libs/foreign.so': > | /usr/lib/R/library/foreign/libs/foreign.so: undefined symbol: isfinite > | Error: package/namespace load failed for 'foreign' > | > | What is going wrong? > > There are interdependencies between the R binary and the dynamically loaded > libraries it loads. By upgrading R, you have agreed to the Faustian bargain > of potentially having to upgrade these libraries too. > > So reinstalling foreign from CRAN should do. R can do that for you, see > help("update.packages") > and make sure you also have r-base-dev installed as this will cover most if > not all of the tools
But since foreign is part of R, installing a new version of R will update the standard and recommended packages including foreign. So this suggests that what is being picked up is another copy of foreign from another library. Make sure R_LIBS is not set, and then start R --vanilla and try again. If that works (as I suspect), check start R again normally, and look at > .libPaths() Then check all those directories other than the last for previously-installed packages and delete duplicates. As Dirk suggests, update.packages(ask=FALSE, checkBuilt=TRUE) will update them all, *provided* you have sufficient file permissions. -- Brian D. Ripley, [EMAIL PROTECTED] 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 ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
