FW: [Rd] Package Installation in RGui (PR#7262)
Gorjanc Gregor
Gregor.Gorjanc at bfro.uni-lj.si
Mon Mar 14 15:58:50 CET 2005
I didn't load the package. I wasn't able to do that, since I wasn't
successfull to install it in first place with install.packages.
-----Original Message-----
From: Uwe Ligges [mailto:ligges at statistik.uni-dortmund.de]
Sent: pon 2005-03-14 15:34
To: Gorjanc Gregor
Cc: r-devel at stat.math.ethz.ch
Subject: Re: [Rd] Package Installation in RGui (PR#7262)
Under Windows, you cannot update / install a package, if the package
has been loaded, because Windows locks the dll. This is a FAQ.
Uwe Ligges
Gorjanc Gregor wrote:
> 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 at 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).
>
More information about the R-devel
mailing list