I installed R 4.1.3 and RStudio-Server 2.22.12.0 on a Linux (RHEL 8.7) server. I am able to access RStudio without any problems, however, I am getting the following errors when trying to install some packages. Note, I was able to download and install other packages so it's not that everything failed to install. The rstudio_tester user's home directory is fully accessible. I tried assigning all the permissions (777) to it but still getting the same errors. I am new to Linux and to RStudio. Please help. Thank you.
Below is an example.
install.packages("formattable")
I'm no expert but looking at the Installation manual I think the /tmp directory on your system is not executable. Try making a /tmp directory in your home directory and then setting the TMPDIR environment variable of R to that directory. To set the variable, use Sys.setenv()
This has resolved my issue. Thank you! I made a tmp directory in my home directory and then set the TMPDIR environment variable of R to that directory. After that, I was able to install the packages that failed to install. Now, I am trying to set up a new default package installation library so any new packages will be installed to that directory instead of the home one which there isn't much storage. I am assuming the tmp folder and the TMPDIR can also be pointing to another directory that's outside of the home one.