R configuration for RStudio Package Manager

Hello! :wave:

I am setting up our newly installed RSPM, and I am struggling to get it connected to the R version installed on that server so that we can serve local packages from git.

The docs say:

Use the path to the R installation directory, not the path to the binary

I have tried a few things without success, and I am not sure what the "installation directory" means here. The binary is in /usr/bin. It looks like various R things have been installed into

  • /usr/lib64/R
  • /usr/include/R
  • /usr/share/R

Possibly other spots? Within R, I get this:

> R.home()
[1] "/usr/lib64/R"

I've tried several of these path options as RVersion in my RStudio Package Manager configuration file, but the logs always say:

Warning: Unable to use R on this system. User namespace sandbox test failed. Building Git packages will be disabled. Consider running the service as root or configuring Git.AllowUnsandboxedGitBuilds = true.

Because of this, I am not able to create a git source for RSPM. Any thoughts/ideas?


Hi @Julia,

I am glad you're able to give this a shot! I know we had talked awhile back about your awesome internal packages and making it easier to share them.

Feel free to open a support ticket if you prefer to troubleshoot in that venue.

In this case, the error message is a bit confusing. It should say,unable to use R on this system _because_ the user namespace sandbox test failed, not because of an improper config location.

Package Manager attempts to run R CMD build for Git packages in a special, sandboxed process for security reasons. However, it appears that in your environment it is failing when trying to create that sandbox.

There are two options:

  1. If you completely trust the source code that you are building from Git (which you probably do if it is internal packages), you can tell Package Manager to skip the sandbox procedure by adding this to your Package Manager configuration file, /etc/rstudio-pm/rstudio-pm.gcfg:
AlllowUnsandboxedGitBuilds = true
  1. If you don't fully trust the code coming from Git (unlikely), you can typically resolve the sandbox error by running Package Manager as root.

For what it is worth, /usr/lib64/R as reported by R.home() is normally the path you want!




That was the issue @slopp! Thanks so much. Now I just have to figure out how to get the GitHub Enterprise access rights sorted out... :smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.