Reputation: 30777
I just installed the new update on OSX because it kept popping up. Of course, it broke something. I can't access my R anymore.
Took me forever to get my environment set up. I have all of my R packages installed with the R I'm using in conda.
How can I fix this? Why do dyld libraries always break when I do any updates or slight tweaks? It really messes up the workflow...
Joshs-MBP:~ mu$ which R
/Users/mu/anaconda/bin/R
Joshs-MBP:~ mu$ R
dyld: Library not loaded: @rpath/libreadline.6.2.dylib
Referenced from: /Users/mu/anaconda/lib/R/lib/libR.dylib
Reason: image not found
Abort trap: 6
```
I'm running OSX Sierra 10.12.6 it literally broke immediately when it started updating Xcode (I thought it was just updating my iTunes).
Joshs-MBP:~ mu$ conda info
Current conda install:
platform : osx-64
conda version : 4.3.29
conda is private : False
conda-env version : 4.3.29
conda-build version : not installed
python version : 3.6.3.final.0
requests version : 2.18.4
root environment : /Users/mu/anaconda (writable)
default environment : /Users/mu/anaconda
envs directories : /Users/mu/anaconda/envs
/Users/mu/.conda/envs
package cache : /Users/mu/anaconda/pkgs
/Users/mu/.conda/pkgs
channel URLs : https://repo.continuum.io/pkgs/main/osx-64
https://repo.continuum.io/pkgs/main/noarch
https://repo.continuum.io/pkgs/free/osx-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/r/osx-64
https://repo.continuum.io/pkgs/r/noarch
https://repo.continuum.io/pkgs/pro/osx-64
https://repo.continuum.io/pkgs/pro/noarch
config file : None
netrc file : None
offline mode : False
user-agent : conda/4.3.29 requests/2.18.4 CPython/3.6.3 Darwin/16.7.0 OSX/10.12.6
UID:GID : 501:20
I tried https://github.com/ContinuumIO/anaconda-issues/issues/6312 but now there's a different but similar error:
Joshs-MBP:~ mu$ R
dyld: Library not loaded: @rpath/libintl.8.dylib
Referenced from: /Users/mu/anaconda/lib/R/lib/libR.dylib
Reason: image not found
Abort trap: 6
Upvotes: 6
Views: 10224
Reputation: 6480
Had latest working Anaconda
and R
.
Tried conda update -c rdonnellyr -c main --all
, but without luck.
Following https://github.com/conda/conda/issues/6183#issuecomment-830132824, duplicated and renamed anaconda3/lib/libreadline.8.1.dylib
to anaconda3/lib/libreadline.6.2.dylib
. The error message changed and started to complain about another lib, in my case, libicuuc.54.dylib
, and then libicui18n.54.dylib
. Repeated similar steps for them, and successfully got R to work in jupyter notebook.
However, rpy2 failed to run with the above work-around, because dlopen
will check version-specific symbols inside the file and cannot be fooled simply by renaming the file.
This is probably a "mixing channel problem". Following https://conda-forge.org/docs/user/tipsandtricks.html, the issue was solved by installing r-essentials
explicitly from conda-forge
channel in a clean conda environment:
conda create --name r-tutorial pandas
conda activate r-tutorial
conda install -c conda-forge r-essentials
pip install rpy2
Upvotes: 2
Reputation: 984
Another option is to update r-base
$ conda update -n base r-base
This worked for me
Upvotes: 1
Reputation: 30777
https://github.com/conda/conda/issues/6183
Try : conda update -c rdonnellyr -c main --all
https://github.com/mingwandroid has a great explanation in what's happening with R
, dylib
, and MacOS
Upvotes: 2