3

I just installed R on Mojave in Anaconda 3 using:

conda install r-base r-essentials r-irkernel

When I type r I get the following error:

dyld: Library not loaded: @rpath/libreadline.6.2.dylib
  Referenced from: /usr/local/anaconda3/lib/R/lib/libR.dylib
  Reason: image not found
Abort trap: 6

I followed the instructions in this issue but it did not help.

K G
  • 1,715
  • 6
  • 21
  • 29

2 Answers2

6

Making a new env should be a cleaner install process and is the best practice. For example,

conda create -n r_40 r-base=4.0 r-essentials r-irkernel

Note: I recommend always explicitly specifying a version (including minor) for r-base since this will help constrain conda update --all to stay within the R version. If you need to change the R version, then it is almost always more efficacious to create a new environment.

Generally, the more you can avoid installing in base env, the better your Conda experience will be.

merv
  • 67,214
  • 13
  • 180
  • 245
-1

If your Mac is running under zsh shell, try to switch to sh

chsh -s /bin/sh