【问题标题】:R is broken with "dyld: Library not loaded: @rpath/libpcre.1.dylib"R 因“dyld:未加载库:@rpath/libpcre.1.dylib”而中断
【发布时间】:2016-11-22 21:17:18
【问题描述】:

我正在尝试关注Brew doctor: dyld: Library not loaded & Error: No available formula for zlib,但它没有帮助。我今天早些时候让我的R 工作,但我通过conda 安装了r-essentials(我的R 最初是如何安装的),现在出现以下错误:

$ 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

【问题讨论】:

    标签: r installation dylib conda dyld


    【解决方案1】:

    我最终删除了整个 anaconda 目录并重新安装 :(

    事后看来,我意识到我需要制作一个 shellscript,以防万一发生任何奇怪的事情,我需要重新安装所有东西。每次我安装一个我认为有用的新模块时,我都会将它添加到这里。

    这是我所有的 PythonR 包:

    # 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
    

    【讨论】:

    • 它发生在我的工作计算机和我的个人计算机上。两者的解决方案相同。我把它记下来了。我制作了一个 shell 脚本,其中包含我需要的所有模块,因此我可以运行它并下载所有模块。基本上就像conda install xarray --yes下一行pip install fastcluster
    • 我通过“conda install -c r r-irkernel zeromq”解决了这个问题的评论(stackoverflow.com/questions/38387027/…
    【解决方案2】:

    文件 libpcre.1.dylib 不在@rpath 中

    我从 /opt/local/lib/ 找到 libpcre.1.dylib 并在我的情况下在 conda 放置 R 库的地方建立了符号链接

    ~/anaconda/lib/R/lib
    

    如果您有类似的情况,这两个命令只需稍加修改即可帮助您

    cd  /Users/you_username/anaconda/lib/R/lib
    
    ln -s /opt/local/lib/libpcre.1.dylib libpcre.1.dylib
    

    然后问题就解决了。

    我的猜测是,当您的计算机中已经安装了 R 并且
    r-essentials 稍后添加到 anaconda insatll 不要将 libpcre.1.dylib 添加到安装中,因为它已经存在。但是完成时没有更新@rpath。

    【讨论】:

    • 感谢您的帮助。我不能再试一次,因为它已经在工作了,但这肯定对其他人有用。
    • ln -s /opt/local/lib/libpcre.1.dylib libpcre.1.dylib 打破了这个。如何撤消此操作?
    • 它打破了我的整个 R :(
    猜你喜欢
    • 2016-05-24
    • 2017-04-20
    • 2016-05-29
    • 2016-10-27
    • 2015-12-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多