dyld:库未加载:/usr/local/opt/openblas/lib/libopenblasp-r0.2.20.dylib [英] dyld: Library not loaded: /usr/local/opt/openblas/lib/libopenblasp-r0.2.20.dylib

查看:286
本文介绍了dyld:库未加载:/usr/local/opt/openblas/lib/libopenblasp-r0.2.20.dylib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行R时,我得到:

dyld: Library not loaded: /usr/local/opt/openblas/lib/libopenblasp-r0.2.20.dylib
  Referenced from: /usr/local/Cellar/r/3.5.0_1/lib/libR.dylib
  Reason: image not found
Abort trap: 6

确实没有该文件:

ls /usr/local/opt/openblas/lib/libopenblasp-r0.2.20.dylib
ls: cannot access '/usr/local/opt/openblas/lib/libopenblasp-r0.2.20.dylib': No such file or directory

我在macOS 10.13.3上,并使用自制软件来安装R,如下所示:

I'm on macOS 10.13.3 and used homebrew to install R like this:

# Java
brew cask install java

# OpenBLAS (installs gcc and other dependencies)
brew install openblas

# R language for statistical computing
brew install r --with-openblas --with-java

# Install XQuartz, needed for R package "Cairo"
brew cask install xquartz

# Needed for R package "RMySQL"
brew install mariadb-connector-c

# Needed for R packages: udunits2, units, ggforce
brew install udunits

推荐答案

让我们看看openblas的安装版本是否为0.2.20:

Let's see if the installed version of openblas is 0.2.20:

brew info openblas 

openblas: stable 0.3.0 (bottled), HEAD [keg-only]
Optimized BLAS library
https://www.openblas.net/
/usr/local/Cellar/openblas/0.3.0 (22 files, 139MB)
  Poured from bottle on 2018-05-31 at 20:42:55
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/openblas.rb
==> Dependencies
Required: gcc ✔
==> Options
--with-openmp
        Enable parallel computations with OpenMP
--HEAD
        Install HEAD version
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides BLAS and LAPACK in the Accelerate framework.

For compilers to find this software you may need to set:
    LDFLAGS:  -L/usr/local/opt/openblas/lib
    CPPFLAGS: -I/usr/local/opt/openblas/include
For pkg-config to find this software you may need to set:
    PKG_CONFIG_PATH: /usr/local/opt/openblas/lib/pkgconfig

我们有0.3.0,但R正在寻找0.2.20

We have 0.3.0 but R is looking for 0.2.20

要解决此问题,我们可以从已安装的dylib创建符号链接:

To fix this, we can create a symlink from the installed dylib:

ln -s /usr/local/opt/openblas/lib/libopenblas.dylib \
      /usr/local/opt/openblas/lib/libopenblasp-r0.2.20.dylib

有效!

R

R version 3.5.0 (2018-04-23) -- "Joy in Playing"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.4.0 (64-bit)

这篇关于dyld:库未加载:/usr/local/opt/openblas/lib/libopenblasp-r0.2.20.dylib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆