[R] update.packages fails on pdf write - CSAgent
Tim Howard
tghoward at gw.dec.state.ny.us
Thu Oct 3 13:56:08 CEST 2013
For the archives, the solution I've come up with is to complete the install in a location where write permissions are allowed for exe files and then simply copy the extracted files from this folder to R's library folder, using the components of update.packages as follows:
#get a list of old packages
x <- old.packages()
#download the zips
download.packages(pkgs = x, destdir = "C:/pathToLocationWhereWritesAreAllowed")
#install them in the safe folder
setwd("C:/pathToLocationWhereWritesAreAllowed")
y <- list.files(pattern = ".zip")
install.packages(pkgs = y, repos = NULL, lib = "C:/pathToLocationWhereWritesAreAllowed")
#now manually copy the folders to the R installation and overwrite the existing ones.
Tim
>>>>>>>>>>>>>>>>>
Date: Wed, 02 Oct 2013 11:17:29 -0400
From: "Tim Howard" <tghoward at gw.dec.state.ny.us>
To: <r-help at r-project.org>
Subject: [R] update.packages fails on pdf write - CSAgent
Message-ID: <524C00C9020000D500B80313 at gwsmtp.dec.state.ny.us>
Content-Type: text/plain; charset=UTF-8
All,
I work in a building where our computers are running Windows XP with
Cisco Security Agent (CSA) activated, locking many automated actions,
especially file writes. We (lowly staff) are allowed to install
software, so on upgrading to R 3.0.2, I tried the standard approach for
updating my packages: Copying the non-base folders from my older
installation into the library folder and running
update.packages(checkBuilt=TRUE, ask=FALSE)
R merrily downloads from the mirror and then continues installation --
until it gets to a package that has a pdf to write, as follows:
> update.packages(checkBuilt=TRUE, ask=FALSE)
--- Please select a CRAN mirror for use in this session ---
trying URL
'http://cran.mirrors.hoobly.com/bin/windows/contrib/3.0/akima_0.5-11.zip'
Content type 'application/zip' length 370759 bytes (362 Kb)
opened URL
downloaded 362 Kb
trying URL
'http://cran.mirrors.hoobly.com/bin/windows/contrib/3.0/bitops_1.0-6.zip'
Content type 'application/zip' length 35878 bytes (35 Kb)
opened URL
downloaded 35 Kb
trying URL
'http://cran.mirrors.hoobly.com/bin/windows/contrib/3.0/chron_2.3-44.zip'
Content type 'application/zip' length 105192 bytes (102 Kb)
opened URL
downloaded 102 Kb
trying URL
'http://cran.mirrors.hoobly.com/bin/windows/contrib/3.0/colorspace_1.2-4.zip'
Content type 'application/zip' length 384585 bytes (375 Kb)
opened URL
downloaded 375 Kb
< .. many more packages ...>
package ?akima? successfully unpacked and MD5 sums checked
package ?bitops? successfully unpacked and MD5 sums checked
package ?chron? successfully unpacked and MD5 sums checked
Error in unzip(zipname, exdir = dest) :
cannot open file 'C:/Program
Files/R/R-3.0.2/library/file8ec2cd16e8/colorspace/doc/hcl-colors.pdf':
Permission denied
>
Here's the message from the Application log in my Event Viewer:
The process 'C:\Program Files\R\R-3.0.2\bin\i386\Rgui.exe' (as user
<myusername>) attempted to access 'C:\Program
Files\R\R-3.0.2\library\file8ec2cd16e8\colorspace\doc\hcl-colors.pdf'.
The attempted access was a write (operation = OPEN/CREATE). The
operation was denied.
So it seems to me that CSA is blocking the installation of this package
because of the PDF write attempt. Please correct me if my interpretation
is wrong!
I can re-install these packages manually, but would love to do it
automatically.
My Questions:
It seems that the pdf is 'extra' since it isn't required for all
packages. Is there a way for me to tell update.packages to not install
these extras? I don't see that as an option at ?update.packages, but I
may be missing it.
Alternatively, is there an easy way to identify and download the zips
needed in a folder of my choice and but then finish the install
manually?
> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: i386-w64-mingw32/i386 (32-bit)
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] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.0.2
>
Thanks for any help
Tim
More information about the R-help
mailing list