I am currently trying install Anacondas RStudio version. Already I have R installed from the official CRAN repositories through apt package manager and the newest version of RStudio. My current version of R is installed in /usr/lib/R
and the path variable set in /usr/bin/R
. When running Anaconda Navigator's RStudio installer, it attempts to install a separate version of R in /opt/anaconda3/lib/R
. The installation process hung and, now I am unable to type R in terminal and open the "old" R version. Instead I get the following error message:
$ R
/opt/anaconda3/lib/R/bin/exec/R: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory
I tried updating path variable for "old" R, but since /opt/anaconda3/bin
is prior to usr/bin
in the path list I still get the same error:
$ export PATH=$PATH:/usr/bin/R
$ echo $PATH
/opt/anaconda3/bin:/opt/anaconda3/condabin:/home/username/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/mplusdemo:/usr/bin/R
Firstly, I am uncertain what this error means. What is libreadline.so.6
? How can I resolve this?
Secondly, do I need to, and is it advised to install R via Anaconda? My current version is updated from the CRAN repos, meaning I get the updates when they're available. Conversely, how up to date is Anacondas version? Alternatively, would it be wise to create a symlink to directory usr/bin/R
in /opt/anaconda3/bin
?
~/R
in your home folder. Which winning point do you get by using Anaconda? – N0rbert Aug 19 '21 at 21:31