I have installed Almalinux 8.5 and configured VNC access.
I have also installed RStudio as user which can be started without any problems from the command line. It correctly recognizes the location of R, which is mecessary for RStudio.
However, when I start RStudio from the application collection on the GUI, the following error message appears:
“Unable to determine real path of R script /opt/miniconda3/envs/qiime2-2021.11/bin/R (system error 2 (Datei oder Verzeichnis nicht gefunden))”
In addition, right-click on the RStudio icon cannot find the details for RStudio.
Since I had to try the RStudio installation twice (made some mistake), I assume that the RStudio icon in the Application GUI is orphaned (see screenshot).
Is there a possibility to clean/re-index the available applications in the GUI?
How did you install the RStudio?
One gets R from EPEL:
sudo dnf install epel-release
sudo dnf config-manager --enable powertools
sudo dnf install R
Seems to be version 4.1.2 now.
Something looks something from Anaconda Python virtual environment “qiime2-2021.11”.
What is “qiime”? What does it have to do with R or RStudio? Why does the desktop session even know about some Python virtual environment? Are they loaded/enabled in .bashrc or .bash_profile?
Having everything “visible, on PATH” may feel convenient, but anything that has not been (RPM)-packaged for EL8 can conflict with other applications. It is better to keep them separate, encapsulated, isolated until you actually use them. (conda activate / module load / scl enable, etc)
sudo dnf localinstall rstudio-2021.09.1-372-x86_64.rpm
Yes, this is a conda environment: It has Qiime2 (v. 2021.11) installed. This is a bioinformatics package for biodiversity research. Since Qiime2 environment comes already with R (v. 4.0.5) I thought it would be ok to use this installation.
Although there is no dependency between Qiime2 and RStudio, some biodiversity data need to be analyzed in more detail by R tools (an I prefer to run them from within RStudio). So, these two tools are independent from each other.
Since you were mentioning epel-release, would you recommend me to install R outside any active conda environment as you specified?
That is a tricky question. On one hand the packaged R from EPEL “just works”. On the other hand its maintainer updates it at upredictable schedule. You probably want to know when updates occur?
Naturally one can install from EPEL and then exclude R, so all R updates from EPEL occur only when you explicitly allow it. R packages (that are not available as RPM) should be compatible with minor updates, but major version update requires reinstall of R packages?
Furthermore, one should never install non-RPM R packages into directories of RPM-package; you need “R library path” in your account’s home or elsewhere.
A route chosen in one (bio)cluster that I know of is to compile R (as regular user) and write an environment module file for each version. Then one can
module load Rto get R into PATH for current shell session. They do have RStudio Server instance and its systemd unit file has been customized to do the equivalent of ‘module load’. See package
The point is that these R are not in any “conda” environment, although that approach could be used too. Its not even in default environment; some activation is always required. (Note though that that cluster has no GUI; one does ssh in to run all programs from CLI.) Besides, one can write a module file that sets same environment as “conda activate” would.
Now, since you have RStudio from RPM and R is not on default PATH you have to ask: in what environment does the RStudio run when you click a GUI icon, and can that environment be customized? If not, then R has to be on default PATH but you definitely don’t want everything to be on default path. (Someone did install python3 the “bad way” and added it to PATH in CentOS 7. Yum did crash from then on, for it did expect ‘python’ to start python2 …)
Thank you very much for your detailed commants. Actually, I had installed R from EPEL in addition to the ‘preinstalled’ R as part of the miniconda envronment.
With your comments, I was able to find out that I made an error in defining which R should be used by RStudio (It is recommended at RStudio web pages and should be: ‘export RSTUDIO_WHICH_R=/usr/bin/R’). After setting the correct value, RStudio start without any error.
And thanks to your comments what to install and add to default path. Being not an (Alma)Linux expert at all, I am quite happy about tools like miniconda and colleagues who provide bioinformatics environments via bioconda.github.io. And I am very grateful to people like you who are willing to help! Thanks again!