The answer most likely is in the message: '\\homer.win.ad.jhu.edu\users$\rvaradh1\Documents' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.
That path starting with a \\ is a *UNC path* (a Windows thing), which I believe install.packages() cannot install to. If you look at the output of: > .libPaths() you'll probably find that the first entry contains the above path (I think). I'm pretty sure there is a non-UNC path to your user home directory, e.g. "C:\Users\rvaradh1" or just "H:", but currently the system environment variable HOME points to '\\homer.win.ad.jhu.edu\users$\rvaradh1\", cf. Sys.getenv("HOME"), which is used by default to set .libPaths(). However, you can control it by setting R_LIBS or R_LIBS_USER to avoid a UNC path, cf ?.libPaths. Also, you may want to tell your sysadm to change HOME to a non-UNC path (which is a bit odd). In the worst case scenario, you can try to map the UNC path to a drive letter and change .libPaths() accordingly, e.g. # Assuming the first lib path is the problematic one: > path <- .libPaths()[1] # Map to drive letter Z > system2("net", args=c("use", "Z:", path)) # Update so that packages are installed to that directory > .libPaths("Z:/") Then retry to install... If you don't understand the above, talk to your sysadm. /Henrik On Thu, Jan 9, 2014 at 8:46 AM, Ravi Varadhan <ravi.varad...@jhu.edu> wrote: > Hi, > I am using following R version: >> version > _ > platform i386-w64-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status > major 3 > minor 0.1 > year 2013 > month 05 > day 16 > svn rev 62743 > language R > version.string R version 3.0.1 (2013-05-16) > nickname Good Sport >> > > I was able to build the source of a package without any errors or warnings. > However, when I try to install the package, I get the following error > messages. Can someone point me to what I am doing wrong? > > Thanks in advance, > Ravi > >> install.packages("H:/Documents/computations/BB_2014.01-1.tar.gz", >> repos=NULL, type="source") > Installing package into > '\\homer.win.ad.jhu.edu/users$/rvaradh1/Documents/R/win-library/3.0' > (as 'lib' is unspecified) > '\\homer.win.ad.jhu.edu\users$\rvaradh1\Documents' > CMD.EXE was started with the above path as the current directory. > UNC paths are not supported. Defaulting to Windows directory. > * installing *source* package 'BB' ... > ** R > ** demo > ** inst > ** byte-compile and prepare package for lazy loading > ** help > *** installing help indices > ** building package indices > ** installing vignettes > ** testing if installed package can be loaded > *** arch - i386 > Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, > logical.return = TRUE) : > there is no package called 'BB' > Error: loading failed > Execution halted > *** arch - x64 > Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, > logical.return = TRUE) : > there is no package called 'BB' > Error: loading failed > Execution halted > ERROR: loading failed for 'i386', 'x64' > * removing > '\\homer.win.ad.jhu.edu/users$/rvaradh1/Documents/R/win-library/3.0/BB' > * restoring previous > '\\homer.win.ad.jhu.edu/users$/rvaradh1/Documents/R/win-library/3.0/BB' > Warning messages: > 1: running command '"C:/PROGRA~1/R/R-30~1.1/bin/i386/R" CMD INSTALL -l > "\\homer.win.ad.jhu.edu\users$\rvaradh1\Documents\R\win-library\3.0" > "H:/Documents/computations/BB_2014.01-1.tar.gz"' had status 1 > 2: In install.packages("H:/Documents/computations/BB_2014.01-1.tar.gz", : > installation of package 'H:/Documents/computations/BB_2014.01-1.tar.gz' had > non-zero exit status >> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org 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. ______________________________________________ R-help@r-project.org 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.