Background
I am running a local instance of Rstudio server on WSL2
Problem
I cannot use blogdown::build_site()
. I get the following error message Error: failed to download modules: exec: "go": executable file not found in $PATH
I downloaded go via linux brew. So I suspect a path issue.
Investigation
In the RStudio server R console, I ran system("echo $PATH") and I get the following:
/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/rstudio-server/bin/postback:/usr/lib/rstudio-server/bin/postback:/usr/lib/rstudio-server/bin/postback:/usr/lib/rstudio-server/bin/postback
However, when I am in the RStudio linux terminal, go into R, and then run system("echo $PATH")
, I get a much different result:
/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/rstudio-server/bin/postback:/usr/lib/rstudio-server/bin/postback:/usr/lib/rstudio-server/bin/postback:/bin:/snap/bin
Question
How can I get the R console in RStudio server to pick the dependencies obtained via linuxbrew?