r-lib / rig

The R Installation Manager
MIT License
663 stars 22 forks source link

Why does rig require sudo to work? #219

Closed vlada79 closed 7 months ago

vlada79 commented 7 months ago

This is major drawback imho. Why does it need access to protected folders? Why can't it work like renv, rvm (for ruby), virtualenv (for python) -- it should be able to create isolated R environment within user accessible folders without need for sudo access.

gaborcsardi commented 7 months ago

Because it installs system packages (on Linux), it installs software for all users (on macOS), reads/writes the registry (on Windows), etc.

On Windows and macOS rig uses the installers build by CRAN which require admin access.

On Linux, we don't have R builds that include every system package and that can be relocated to any place on the disk, so we need root access to install the dependent system packages, and to install R into /opt.