You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Install and Switch to R fails on Windows with an invalid R link file error #19468
RStudio Edition : Desktop
RStudio Version : 2026.12.0, built from a branch that includes main through 330045c29e (after https://github.com/rstudio/rstudio/pull/19158)
OS Version : Windows 11 Home 10.0.26200
R Version : 4.4.3 (x64)
Steps to reproduce the problem
Before starting, rig's R links from earlier user-mode installs must exist in %USERPROFILE%\.local\bin. On the machine where this occurs they include R-release.exe, R-4.4.3-x86_64.exe and R.exe.
Create a project and set its .Rproj file to an R version that isn't installed, with a different major.minor version than the running R:
RVersion: 4.3.3
Open the project.
The Console notice offers "Install and Switch to R 4.3.3".
Click "Install and Switch to R 4.3.3".
In the "Install R 4.3.3" dialog, leave the default folder and click "Install and Switch to R 4.3.3".
The install job starts and stops right away with:
Error: Cannot extract R version from C:\Users\<user>\.local\bin\R-release.exe, invalid R link file?
Nothing is installed.
The same error comes from rig alone (rig 0.11.0, as bundled with RStudio), from a Command Prompt, when RIG_R_INSTALL_DIR is written with forward slashes:
set RIG_R_INSTALL_DIR=C:/Users/<user>/AppData/Roaming/rig/data/r
rig list --user
With backslashes in RIG_R_INSTALL_DIR, or with it unset, rig list --user lists the installed versions.
Describe the problem in detail
On Windows, installing R from the project R version notice fails whenever rig's R links already exist in %USERPROFILE%\.local\bin. The install job's output shows the folder as C:/Users/<user>/AppData/Roaming/rig/data/r, with forward slashes. This was seen on Windows 11 ARM64 with the x64 RStudio. I haven't checked it on an x64 Windows machine.
Describe the behavior you expected
R 4.3.3 installs into the confirmed folder and RStudio switches to it.
Activity
Log the rig install folder as rig gets it, and clarify the comments
convert the rig install folder in one tested helper
Pass the R install folder to rig with backslashes on Windows (#19476)
Pass rig the real R install folder, resolving junctions, on Windows
Move rig's links to R in other folders aside while installing R on Wi…
Treat a rig link with damaged lengths as unreadable
kevinushey commentedon Dec 2, 2026
Fixed by #19476. Installing into a folder other than the one rig's links point into is tracked in #19561.