2

I'm trying to follow Brew doctor: dyld: Library not loaded & Error: No available formula for zlib but it isn't helping. I had my R working earlier today but I installed r-essentials through conda (how my R was installed originally) and am now getting the following error:

$ which R
/Users/jespinoz/anaconda/bin/R

$ /Users/jespinoz/anaconda/bin/R
dyld: Library not loaded: @rpath/libpcre.1.dylib
  Referenced from: /Users/jespinoz/anaconda/lib/R/lib/libR.dylib
  Reason: image not found
Trace/BPT trap: 5
Community
  • 1
  • 1
O.rka
  • 29,847
  • 68
  • 194
  • 309

2 Answers2

2

The file libpcre.1.dylib is not in @rpath

I found libpcre.1.dylib from /opt/local/lib/ and made symbolic link where conda put R's libraries, in my case

~/anaconda/lib/R/lib

If you have similar situation these 2 commands with few modifications should help you

cd  /Users/you_username/anaconda/lib/R/lib

ln -s /opt/local/lib/libpcre.1.dylib libpcre.1.dylib

and then the problem got solved.

My gess is that when you have R already installed in you computer and
r-essentials are added later to anaconda insatll don't add the libpcre.1.dylib to installation because it already exists. But when finishing didn't update @rpath.

tonu
  • 31
  • 2
1

I ended up deleting my entire anaconda directory and reinstalling :(

In hindsight, I realized that I needed to make a shellscript just incase anything weird happened and I needed to reinstall everything again. Everytime I install a new module that I think will be useful I just add it to here.

Here's all my Python and R packages:

# Python
conda install xarray --yes
conda install holoviews --yes
conda install seaborn --yes
conda install scikit-learn --yes
conda install scikit-image --yes
conda install -c https://conda.anaconda.org/biocore scikit-bio --yes
conda install dill --yes
conda install pandas --yes
conda install numpy --yes
conda install networkx --yes
conda install scipy --yes
pip install fastcluster
conda install -c jjhelmus tensorflow=0.8.0rc0 --yes
conda install bokeh --yes
conda install BioPython --yes
conda install tqdm --yes
pip install git+https://github.com/pymc-devs/pymc3
conda install dask --yes
conda install numba --yes
pip install nbopen
pip install nbextensions
pip install https://github.com/ipython-contrib/IPython-notebook-extensions/tarball/master
conda install html5lib --yes
pip install selenium
conda install phantoms --yes
pip install pubchempy —yes
conda install --channel https://conda.anaconda.org/rdkit rdkit --yes
conda install --channel https://conda.anaconda.org/bioconda bioservices --yes
conda install --channel https://conda.anaconda.org/ales-erjavec orange-bioinformatics
pip install plotly
pip install ete3

# R
conda install -c r r --yes
conda install -c r r-essentials --yes
conda install -c r r-rserve --yes
conda install -c r r-devtools --yes
conda install -c r r-rcurl --yes
conda install -c r r-RJSONIO --yes
conda install -c r r-jpeg --yes
conda install -c r r-png --yes
conda install -c r r-roxygen2 --yes
conda install --channel https://conda.anaconda.org/bioconda bioconductor-edger --yes
O.rka
  • 29,847
  • 68
  • 194
  • 309
  • It's happened on my work computer and my personal. Same solution to both. I got it down tho. I made a shell script that has all of my modules that I need so I can run that and it downloads all of them. Basically just like `conda install xarray --yes` next line `pip install fastcluster`, etc. – O.rka Jul 29 '16 at 15:34
  • I solved this by "conda install -c r r-irkernel zeromq"from a comment of this stackoverflow question(http://stackoverflow.com/questions/38387027/unable-to-load-irkernel-in-jupyter-notebook) – DQ_happy Jul 29 '16 at 17:22