How to install R-packages that need to compile without root access?

view full story

http://stackoverflow.com – Background Info I am using an account on an HPC cluster running CentOS 6.2. I built R (3.0.1) from source to directory ~/usr. The platform field from the sessionInfo() command within R yields x86_64-unknown-linux-gnu (64-bit). Edit:.libPaths() returns /home/fcastle/usr/lib64/R/library. Problem When trying to install the package gmp from within R with install.packages("gmp") or from command line with R CMD INSTALL gmp_0.5-10.tar.gz, I get the (abbreviated) error below. I believe the main culprit is the call to g++ which directs the compiler to "default" include directories for which I do (HowTos)