In reference to the thread http://tolstoy.newcastle.edu.au/R/devel/04/10/0859.html I have the same problem updating packages with newly-installed version of released version of R 2.0.1. Previous posts refer to a bug in windows. I wonder if there is a work-around? This probably should go to R-help but it follows on from the post in R-devel. Apologies in advance. OS: Windows XP Professional, with current patches. I have administrator rights. R version 2.0.1 released version (newly re-installed). Problem: update.packages() downloads the binaries, but installation stops with the same error message, and the package to be upgraded disappears entirely: package 'boot' successfully unpacked and MD5 sums checked bundle 'VR' successfully unpacked and MD5 sums checked package 'cluster' successfully unpacked and MD5 sums checked package 'foreign' successfully unpacked and MD5 sums checked package 'KernSmooth' successfully unpacked and MD5 sums checked package 'lattice' successfully unpacked and MD5 sums checked package 'nlme' successfully unpacked and MD5 sums checked Error: Can not remove prior installation of package 'nlme' In addition: Warning message: unable to move temp installation 'C:/PROGRA~1/R/rw2001/library\file30867/foreign' to 'C:/PROGRA~1/R/rw2001/library/foreign' > library(nlme) Error in library(nlme) : There is no package called 'nlme' Keith > update.packages() trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/PACKAGES' Content type `text/plain; charset=iso-8859-1' length 26875 bytes opened URL downloaded 26Kb boot : Version 1.2-20 in C:/PROGRA~1/R/rw2001/library Version 1.2-22 on CRAN Update (y/N)? y VR : Version 7.2-10 in C:/PROGRA~1/R/rw2001/library Version 7.2-12 on CRAN Update (y/N)? y cluster : Version 1.9.6 in C:/PROGRA~1/R/rw2001/library Version 1.9.7 on CRAN Update (y/N)? y foreign : Version 0.8-0 in C:/PROGRA~1/R/rw2001/library Version 0.8-5 on CRAN Update (y/N)? y KernSmooth : Version 2.22-14 in C:/PROGRA~1/R/rw2001/library Version 2.22-15 on CRAN Update (y/N)? y lattice : Version 0.10-14 in C:/PROGRA~1/R/rw2001/library Version 0.10-16 on CRAN Update (y/N)? y nlme : Version 3.1-53 in C:/PROGRA~1/R/rw2001/library Version 3.1-56 on CRAN Update (y/N)? y rpart : Version 3.1-20 in C:/PROGRA~1/R/rw2001/library Version 3.1-22 on CRAN Update (y/N)? y survival : Version 2.15 in C:/PROGRA~1/R/rw2001/library Version 2.16 on CRAN Update (y/N)? y trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/boot_1.2-22.zip' Content type `application/zip' length 767540 bytes opened URL downloaded 749Kb trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/VR_7.2-12.zip' Content type `application/zip' length 1551825 bytes opened URL downloaded 1515Kb trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/cluster_1.9.7.zip' Content type `application/zip' length 472995 bytes opened URL downloaded 461Kb trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/foreign_0.8-5.zip' Content type `application/zip' length 172108 bytes opened URL downloaded 168Kb trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/KernSmooth_2.22-15.zip' Content type `application/zip' length 95039 bytes opened URL downloaded 92Kb trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/lattice_0.10-16.zip' Content type `application/zip' length 650372 bytes opened URL downloaded 635Kb trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/nlme_3.1-56.zip' Content type `application/zip' length 2144937 bytes opened URL downloaded 2094Kb trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/rpart_3.1-22.zip' Content type `application/zip' length 233548 bytes opened URL downloaded 228Kb trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/survival_2.16.zip' Content type `application/zip' length 954786 bytes opened URL downloaded 932Kb package 'boot' successfully unpacked and MD5 sums checked bundle 'VR' successfully unpacked and MD5 sums checked package 'cluster' successfully unpacked and MD5 sums checked package 'foreign' successfully unpacked and MD5 sums checked package 'KernSmooth' successfully unpacked and MD5 sums checked package 'lattice' successfully unpacked and MD5 sums checked package 'nlme' successfully unpacked and MD5 sums checked Error: Can not remove prior installation of package 'nlme' In addition: Warning message: unable to move temp installation 'C:/PROGRA~1/R/rw2001/library\file30867/foreign' to 'C:/PROGRA~1/R/rw2001/library/foreign' > library(nlme) Error in library(nlme) : There is no package called 'nlme' > library(lattice) > library(boot) Attaching package 'boot': The following object(s) are masked from package:lattice : melanoma > library(rpart) > library(survival) Loading required package: splines Attaching package 'survival': The following object(s) are masked from package:boot : aml > library(VR) Error in library(VR) : There is no package called 'VR' > library(cluster) > library(foreign) Error in library(foreign) : There is no package called 'foreign' > library(KernSmooth) KernSmooth 2.22 installed Copyright M. P. Wand 1997 > library(lattice) > local({a <- CRAN.packages() + install.packages(select.list(a[,1],,TRUE), .libPaths()[1], available=a, dependencies=TRUE)}) trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/PACKAGES' Content type `text/plain; charset=iso-8859-1' length 26875 bytes opened URL downloaded 26Kb trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/nlme_3.1-56.zip' Content type `application/zip' length 2144937 bytes opened URL downloaded 2094Kb package 'nlme' successfully unpacked and MD5 sums checked Delete downloaded files (y/N)? The packages are in C:\DOCUME~1\KeithW\LOCALS~1\Temp\Rtmp6848\Rinstdir19641 updating HTML package descriptions > local({a <- CRAN.packages() + install.packages(select.list(a[,1],,TRUE), .libPaths()[1], available=a, dependencies=TRUE)}) trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/PACKAGES' Content type `text/plain; charset=iso-8859-1' length 26875 bytes opened URL downloaded 26Kb trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/VR_7.2-12.zip' Content type `application/zip' length 1551825 bytes opened URL downloaded 1515Kb bundle 'VR' successfully unpacked and MD5 sums checked Error: Can not remove prior installation of package 'MASS' >
I think this is a FAQ, hence not appropriate on ANY mailing list: Please read a) The R for Windows FAQs, Section (currently 3.8) "update.packages() fails" and b) note that VR is a package bundle, hence nothing dubious if library(VR) fails. Also, if package MASS has been loaded, you cannot update the VR bundle. Uwe Ligges Keith Wong wrote:> In reference to the thread > http://tolstoy.newcastle.edu.au/R/devel/04/10/0859.html > > I have the same problem updating packages with newly-installed version > of released version of R 2.0.1. Previous posts refer to a bug in > windows. I wonder if there is a work-around? This probably should go to > R-help but it follows on from the post in R-devel. Apologies in advance. > > OS: Windows XP Professional, with current patches. I have administrator > rights. > R version 2.0.1 released version (newly re-installed). > > Problem: > update.packages() downloads the binaries, but installation stops with > the same error message, and the package to be upgraded disappears entirely: > > package 'boot' successfully unpacked and MD5 sums checked > bundle 'VR' successfully unpacked and MD5 sums checked > package 'cluster' successfully unpacked and MD5 sums checked > package 'foreign' successfully unpacked and MD5 sums checked > package 'KernSmooth' successfully unpacked and MD5 sums checked > package 'lattice' successfully unpacked and MD5 sums checked > package 'nlme' successfully unpacked and MD5 sums checked > Error: Can not remove prior installation of package 'nlme' > In addition: Warning message: > unable to move temp installation > 'C:/PROGRA~1/R/rw2001/library\file30867/foreign' to > 'C:/PROGRA~1/R/rw2001/library/foreign' > > library(nlme) > Error in library(nlme) : There is no package called 'nlme' > > > Keith > > > > update.packages() > trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/PACKAGES' > Content type `text/plain; charset=iso-8859-1' length 26875 bytes > opened URL > downloaded 26Kb > > boot : > Version 1.2-20 in C:/PROGRA~1/R/rw2001/library > Version 1.2-22 on CRAN > Update (y/N)? y > VR : > Version 7.2-10 in C:/PROGRA~1/R/rw2001/library > Version 7.2-12 on CRAN > Update (y/N)? y > cluster : > Version 1.9.6 in C:/PROGRA~1/R/rw2001/library > Version 1.9.7 on CRAN > Update (y/N)? y > foreign : > Version 0.8-0 in C:/PROGRA~1/R/rw2001/library > Version 0.8-5 on CRAN > Update (y/N)? y > KernSmooth : > Version 2.22-14 in C:/PROGRA~1/R/rw2001/library > Version 2.22-15 on CRAN > Update (y/N)? y > lattice : > Version 0.10-14 in C:/PROGRA~1/R/rw2001/library > Version 0.10-16 on CRAN > Update (y/N)? y > nlme : > Version 3.1-53 in C:/PROGRA~1/R/rw2001/library > Version 3.1-56 on CRAN > Update (y/N)? y > rpart : > Version 3.1-20 in C:/PROGRA~1/R/rw2001/library > Version 3.1-22 on CRAN > Update (y/N)? y > survival : > Version 2.15 in C:/PROGRA~1/R/rw2001/library > Version 2.16 on CRAN > Update (y/N)? y > trying URL > `http://cran.r-project.org/bin/windows/contrib/2.0/boot_1.2-22.zip' > Content type `application/zip' length 767540 bytes > opened URL > downloaded 749Kb > > trying URL > `http://cran.r-project.org/bin/windows/contrib/2.0/VR_7.2-12.zip' > Content type `application/zip' length 1551825 bytes > opened URL > downloaded 1515Kb > > trying URL > `http://cran.r-project.org/bin/windows/contrib/2.0/cluster_1.9.7.zip' > Content type `application/zip' length 472995 bytes > opened URL > downloaded 461Kb > > trying URL > `http://cran.r-project.org/bin/windows/contrib/2.0/foreign_0.8-5.zip' > Content type `application/zip' length 172108 bytes > opened URL > downloaded 168Kb > > trying URL > `http://cran.r-project.org/bin/windows/contrib/2.0/KernSmooth_2.22-15.zip' > Content type `application/zip' length 95039 bytes > opened URL > downloaded 92Kb > > trying URL > `http://cran.r-project.org/bin/windows/contrib/2.0/lattice_0.10-16.zip' > Content type `application/zip' length 650372 bytes > opened URL > downloaded 635Kb > > trying URL > `http://cran.r-project.org/bin/windows/contrib/2.0/nlme_3.1-56.zip' > Content type `application/zip' length 2144937 bytes > opened URL > downloaded 2094Kb > > trying URL > `http://cran.r-project.org/bin/windows/contrib/2.0/rpart_3.1-22.zip' > Content type `application/zip' length 233548 bytes > opened URL > downloaded 228Kb > > trying URL > `http://cran.r-project.org/bin/windows/contrib/2.0/survival_2.16.zip' > Content type `application/zip' length 954786 bytes > opened URL > downloaded 932Kb > > package 'boot' successfully unpacked and MD5 sums checked > bundle 'VR' successfully unpacked and MD5 sums checked > package 'cluster' successfully unpacked and MD5 sums checked > package 'foreign' successfully unpacked and MD5 sums checked > package 'KernSmooth' successfully unpacked and MD5 sums checked > package 'lattice' successfully unpacked and MD5 sums checked > package 'nlme' successfully unpacked and MD5 sums checked > Error: Can not remove prior installation of package 'nlme' > In addition: Warning message: > unable to move temp installation > 'C:/PROGRA~1/R/rw2001/library\file30867/foreign' to > 'C:/PROGRA~1/R/rw2001/library/foreign' > > library(nlme) > Error in library(nlme) : There is no package called 'nlme' > > library(lattice) > > library(boot) > > Attaching package 'boot': > > > The following object(s) are masked from package:lattice : > > melanoma > > > library(rpart) > > library(survival) > Loading required package: splines > > Attaching package 'survival': > > > The following object(s) are masked from package:boot : > > aml > > > library(VR) > Error in library(VR) : There is no package called 'VR' > > library(cluster) > > library(foreign) > Error in library(foreign) : There is no package called 'foreign' > > library(KernSmooth) > KernSmooth 2.22 installed > Copyright M. P. Wand 1997 > > library(lattice) > > local({a <- CRAN.packages() > + install.packages(select.list(a[,1],,TRUE), .libPaths()[1], > available=a, dependencies=TRUE)}) > trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/PACKAGES' > Content type `text/plain; charset=iso-8859-1' length 26875 bytes > opened URL > downloaded 26Kb > > trying URL > `http://cran.r-project.org/bin/windows/contrib/2.0/nlme_3.1-56.zip' > Content type `application/zip' length 2144937 bytes > opened URL > downloaded 2094Kb > > package 'nlme' successfully unpacked and MD5 sums checked > > Delete downloaded files (y/N)? > The packages are in C:\DOCUME~1\KeithW\LOCALS~1\Temp\Rtmp6848\Rinstdir19641 > updating HTML package descriptions > > local({a <- CRAN.packages() > + install.packages(select.list(a[,1],,TRUE), .libPaths()[1], > available=a, dependencies=TRUE)}) > trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/PACKAGES' > Content type `text/plain; charset=iso-8859-1' length 26875 bytes > opened URL > downloaded 26Kb > > trying URL > `http://cran.r-project.org/bin/windows/contrib/2.0/VR_7.2-12.zip' > Content type `application/zip' length 1551825 bytes > opened URL > downloaded 1515Kb > > bundle 'VR' successfully unpacked and MD5 sums checked > Error: Can not remove prior installation of package 'MASS' > > > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Hello! I have just encountered the same situation as Heather and also Paul Gilbert at http://tolstoy.newcastle.edu.au/R/devel/05/02/2095.html I went into install.packages() in current release as well as in R-devel and there is really no problem with \ or /. However, I also had the same warning> install.packages("RODBC")[... snip ...] Delete downloaded files (y/N)? y updating HTML package descriptions Warning message: unable to move temp installation 'N:/Ovce/Programi/R/rw2001/library\file27583/RODBC' to 'N:/Ovce/Programi/R/rw2001/library/RODBC' The warning is issued from this part of install.packages() if (ret == 0) { ## Move the new package to the install lib and ## remove our temp dir ret <- file.rename(file.path(tmpDir, curPkg), instPath) if(!ret) warning("unable to move temp installation ", sQuote(file.path(tmpDir, curPkg)), " to ", sQuote(instPath), call. = FALSE) } else { ## !! Can't revert to old 'zip.unpack' as it would ## !! potentially leave cruft from a bundle in there stop("Can not remove prior installation of package ", sQuote(curPkg), call. = FALSE) } "Problem" lies in ret <- file.rename(file.path(tmpDir, curPkg), instPath) I went through the whole function "by hand" and at first the above line didn't moved tmpDir to instPath. I tried several times and after a while it was successfull. It is strange that it happens only with some packages i.e. in my case with RODBC and car. I also noted that line above takes quite a lot of time to "accomplish" its work. It actually causes R to freeze for a moment. If I launched file.rename(file.path(tmpDir, curPkg), instPath) move was done in a moment. I know, that this comment is not the answer to the problem. However, someone might come with that. One more thing. I have R installed on networked disk. I assume that Heather does also, since disk letter is H. On the other hand, Paul reported problems with C disk. Windows XP SP1 R 2.0.1 On Tue, 5 Oct 2004 Heather.Turner@warwick.ac.uk wrote:> Full_Name: Heather Turner > Version: 2.0.0 > OS: Windows NT > Submission from: (NULL) (137.205.8.2) > > > I tried using the Packages menu to install the gam package and get the following > output: > > > local({a <- CRAN.packages() > + install.packages(select.list(a[,1],,TRUE), .libPaths()[1], available=a, > dependencies=TRUE)}) > trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/PACKAGES' > Content type `text/plain; charset=iso-8859-1' length 21246 bytes > opened URL > downloaded 20Kb > > trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/gam_0.92.zip' > Content type `application/zip' length 224167 bytes > opened URL > downloaded 218Kb > > package 'gam' successfully unpacked and MD5 sums checked > > Delete downloaded files (y/N)? y > > Warning message: > unable to move temp installation 'H:/rw2000/library\file15762/gam' to > 'H:/rw2000/library/gam' > > I get the same message if I opt to delete the downloaded files and the > same problem if I try to install from a downloaded .zip file instead - > not really surprising as seems to "unpack" file okay, but loses the > temporary file. As the syntax of the file path for the temporary file is > incorrect, I'm assuming this is a bug in install.packages or one of the > functions it calls...Since you _incorrectly_ assume that the syntax is incorrect, the rest of your assumption is incorrect. As the FAQ asks, please don't speculate about things you are not expert about, but stick to facts. Also as the FAQ asks, don't misuse R-bugs for things you do not know _for sure_ are bugs in R. FYI, Windows accepts both /and \ in file paths, including a mixture. If your speculation was correct install.packages() would work for no one, and do you seriously think that such a bug would go unreported and unfixed. We have seen this once before, and it was a Windows bug solved by updating Windows to the latest set of patches. Since you have not reported a precise version of Windows, it is hard for us to know what you were using, but if you mean NT4.0, that is rather old (last Service Pack five years ago I read yesterday). -- Brian D. Ripley, ripley@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 -- Lep pozdrav / With regards, Gregor GORJANC ------------------------------------------------------------------------ University of Ljubljana Biotechnical Faculty URI: http://www.bfro.uni-lj.si/MR/ggorjan Zootechnical Department email: gregor.gorjanc <at> bfro.uni-lj.si Groblje 3 tel: +386 (0)1 72 17 861 SI-1230 Domzale fax: +386 (0)1 72 17 888 Slovenia