[Rd] update.packages fails with directory not found

Mike Prager mike.prager at mhprager.com
Mon May 10 16:01:51 CEST 2010


[New material at end]

Duncan Murdoch wrote on 5/10/2010 9:33 AM:
> On 10/05/2010 8:28 AM, Mike Prager wrote:
>> On Mon, 10 May 2010 06:33:54 -0400, Duncan Murdoch
>> <murdoch.duncan at gmail.com> wrote:
>>
>> >Mike Prager wrote:
>> >> Windows XP.  I have just updated to R 2.11.0 and then run
>> >> update.packages. In the series of updates, a few will succeed, then I
>> >> get a failure like
>> >>
>> >>
>> >> package 'mvtnorm' successfully unpacked and MD5 sums checked
>> >> package 'party' successfully unpacked and MD5 sums checked
>> >> package 'PBSmodelling' successfully unpacked and MD5 sums checked
>> >> Error in normalizePath(path) : >>   path[1]="c:\Program 
>> Files\R\Library/PBSmodelling": The system cannot
>> >> find the file specified
>> >> >
>> >Is that a cut and paste of the error message?  Normally R would 
>> double >the backslashes when displaying a string, so it looks as 
>> though you've >somehow got a path containing the control characters 
>> \P, \R, and \L. >Did you set the lib.loc argument when you called 
>> update.packages?
>>
>> Thank you!  Yes, it's cut and paste.  I did not set lib.loc in the
>> call (made through the Rgui.exe menu system), but I have the library
>> location defined in the environment:
>>
>> R_LIBS=c:/Program Files/R/Library
>>
>> I've been using this approach for several years, and it's worked
>> without problem until now.
> I can't seem to reproduce this.  If it happens reproducibly on your 
> system, could you please do the following:
> print the result of installed.packages()["PBSmodelling",], .libPaths() 
> and sessionInfo()?
>
> A possible workaround is to get the names of all of your packages in 
> the Library folder and install them, rather than using the 
> update.packages() function.  This may fail if some of them aren't on 
> CRAN or the other repositories.
>

Duncan, thanks again.  At the end of this message is a session 
transcript with the things you asked.  Rather than edit out something 
that might prove important, I am sending the entire transcript.

Yes, installing rather than updating is a workaround.

One thing in the session log requires explanation. The two directories 
under .libPaths point to the same place. This is because drive D: is an 
alias, generated with the "subst" Windows command, for "c:/Program 
Files/".  I had been specifying environment variable

R_LIBS=d:/R/Library

but to eliminate that as a potential cause of the problem, I changed it to

R_LIBS=c:/Program Files/R/Library

with no change in symptoms.

I note that (as another user with the same issue pointed out to me in an 
email) there are new directories filexxxxxx (where the xxxxxx are hex 
digits) in the library location. These seem to be from the failed 
updates.  For example, file1eb26e9 has one subdirectory, PBSmodeling.

Something different now from when updates all succeeded in the past is 
that I have a large upload (to Amazon S3) running in the background. I 
can't guess whether this is part of the issue. A time-out on the 
directory rename would be a wild guess.

MHP


------- session transcript follows -----

R version 2.11.0 (2010-04-22)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

   Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Loading required package: survival
Loading required package: stats
Loading required package: utils
Loading required package: graphics
Loading required package: splines

Attaching package: 'Hmisc'

The following object(s) are masked from 'package:survival':

     untangle.specials

The following object(s) are masked from 'package:base':

     format.pval, round.POSIXt, trunc.POSIXt, units

[Previously saved workspace restored]

 > update.packages(ask='graphics')
trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.11/rJava_0.8-4.zip'
Content type 'application/zip' length 571732 bytes (558 Kb)
opened URL
downloaded 558 Kb

trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.11/SparseM_0.85.zip'
Content type 'application/zip' length 927538 bytes (905 Kb)
opened URL
downloaded 905 Kb

trying URL 
'http://cran.wustl.edu/bin/windows/contrib/2.11/strucchange_1.4-0.zip'
Content type 'application/zip' length 968725 bytes (946 Kb)
opened URL
downloaded 946 Kb

trying URL 
'http://cran.wustl.edu/bin/windows/contrib/2.11/svMisc_0.9-57.zip'
Content type 'application/zip' length 134502 bytes (131 Kb)
opened URL
downloaded 131 Kb

trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.11/vcd_1.2-8.zip'
Content type 'application/zip' length 1179976 bytes (1.1 Mb)
opened URL
downloaded 1.1 Mb

trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.11/XML_3.1-0.zip'
Content type 'application/zip' length 2347364 bytes (2.2 Mb)
opened URL
downloaded 2.2 Mb

trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.11/zoo_1.6-3.zip'
Content type 'application/zip' length 1065934 bytes (1.0 Mb)
opened URL
downloaded 1.0 Mb

package 'rJava' successfully unpacked and MD5 sums checked
package 'SparseM' successfully unpacked and MD5 sums checked
Error in normalizePath(path) :
   path[1]="d:\R\Library/SparseM": The system cannot find the file specified
 > installed.packages()["SparseM",]
Error: subscript out of bounds
 > .libPaths()
[1] "d:/R/Library"                    "C:/PROGRA~1/R/R-211~1.0/library"
 > sessionInfo()
R version 2.11.0 (2010-04-22)
i386-pc-mingw32

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United 
States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] grDevices datasets  splines   graphics  utils     stats     
methods   base

other attached packages:
[1] Hmisc_3.8-0     survival_2.35-8

loaded via a namespace (and not attached):
[1] cluster_1.12.3 grid_2.11.0    lattice_0.18-5 tools_2.11.0
 >



More information about the R-devel mailing list