I was able to install RStudio on a Centos7 Linux server so as I can access hosted RStudio in my browser.
I downloaded and installed rstudio in my terminal as root user doug. When visited my hosted rstudio instance and attempted to login with login details for doug I was unable to so I created a new user using adduser called 'rstudio'.
After setting new user rstudio a password I was able to login.
At this point I can use R within R studio and everything looks fine. I'm able to run base R, save scripts etc from within RStudio GUI.
However, I'm unable to install.packages(). Any and all packages I attempt to install come back with error message
Warning in install.packages : installation of package ‘[any package I try to install name]’ had non-zero exit status
I tried installing packages within R within the terminal. First as newly created user 'rstudio' and then as myself 'doug'. In both cases I received the same error message when trying to install packages.
I suspected a user permissions issue and granted rstudio read, write and execute permissions on /home/rstudio.
I also tried adding parameter dependencies = T on my install.packages() commands however I still received the same message and failed to install any packages.
Whats causing this and how can I overcome this?
sessionInfo() R version 3.5.0 (2018-04-23) Platform: x86_64-redhat-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core) Matrix products: default BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so locale:  LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8  LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8  LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C  LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages:  stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached):  compiler_3.5.0 tools_3.5.0 yaml_2.2.0