Trouble installing RStudio Server on Ubuntu--can't find R, but it's there



I tried installing RStudio Server according to the docs. I got this error:

balter@spectre:~$ sudo rstudio-server verify-installation
Unable to find an installation of R on the system (which R didn't return valid output); Unable to locate R binary by scanning standard locations
balter@spectre:~$ which R
balter@spectre:~$ Rscript -e 'print("hello")'
[1] "hello"


Did you really follow the docs? It says that to install R you should use:

sudo apt-get install r-base

but you are using Conda to install it. So when it tries ...scanning standard locations, it fails.


Well, I want to use the conda R, so what do I do? Can I set the path to R somewhere?


Found the answer here: