When trying to install certain (or all?) R packages, I always bump into the following type of error, which seems to me to be not specific to a particular package, but rather specific to for my R environment.
> install.packages("plspm")
Installing package into ‘/home/ruser/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
also installing the dependencies ‘shape’, ‘amap’, ‘diagram’, ‘tester’, ‘turner’
trying URL 'http://cran.rstudio.com/src/contrib/shape_1.4.1.tar.gz'
Content type 'application/x-gzip' length 683458 bytes (667 Kb)
opened URL
==================================================
downloaded 667 Kb
trying URL 'http://cran.rstudio.com/src/contrib/amap_0.8-12.tar.gz'
Content type 'application/x-gzip' length 257611 bytes (251 Kb)
opened URL
==================================================
downloaded 251 Kb
trying URL 'http://cran.rstudio.com/src/contrib/diagram_1.6.2.tar.gz'
Content type 'application/x-gzip' length 466608 bytes (455 Kb)
opened URL
==================================================
downloaded 455 Kb
trying URL 'http://cran.rstudio.com/src/contrib/tester_0.1.7.tar.gz'
Content type 'application/x-gzip' length 112000 bytes (109 Kb)
opened URL
==================================================
downloaded 109 Kb
trying URL 'http://cran.rstudio.com/src/contrib/turner_0.1.7.tar.gz'
Content type 'application/x-gzip' length 106530 bytes (104 Kb)
opened URL
==================================================
downloaded 104 Kb
trying URL 'http://cran.rstudio.com/src/contrib/plspm_0.4.1.tar.gz'
Content type 'application/x-gzip' length 367040 bytes (358 Kb)
opened URL
==================================================
downloaded 358 Kb
The downloaded source packages are in
‘/tmp/RtmpJsgPbd/downloaded_packages’
> library(plspm)
Error in library(plspm) : there is no package called ‘plspm’
Here's my R environment information:
> sessionInfo()
R version 3.0.3 (2014-03-06)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=C
[4] LC_COLLATE=C LC_MONETARY=C LC_MESSAGES=C
[7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=C LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RCurl_1.95-4.1 bitops_1.0-6
loaded via a namespace (and not attached):
[1] tools_3.0.3
From within RStudio, I've also tried to specify dependencies=TRUE
in install.packages()
and specify type="source"
(which is default on Linux anyway), but to no avail.
It seems that I've always been able to overcome this problem by successfully installing R packages manually from command line (as ruser
user), which was the case this time as well:
R CMD INSTALL --build <'plspm' dependencies and their dependencies>
R CMD INSTALL --build plspm_0.4.1.tar.gz
> library(plspm)
Loading required package: amap
Loading required package: diagram
Loading required package: shape
Loading required package: tester
Loading required package: turner
> installed.packages()
Package LibPath
plspm "plspm" "/home/ruser/R/x86_64-pc-linux-gnu-library/3.0"
Version Priority
plspm "0.4.1" NA
Depends
plspm "R (>= 3.0.1), amap, diagram, tester, turner"
NeedsCompilation Built
plspm "no" "3.0.3"
Question
Why I have been able to successfully install plspm
(and other packages, for that matter) by manually installing its dependencies and then itself, step-by-step, in R sessions launched from command line in Ubuntu as ruser
, but have failed to do the same from within RStudio Server?
I would appreciate any advice toward understanding and fixing this systemic problem in my R environment!