将brew安装的openblas链接到/ usr / local

时间:2019-08-22 13:38:39

标签: r openblas

我已经安装了R,而反过来又安装了openblas-但对/usr/local却没有安装{em> :

==> openblas
openblas 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 openblas you may need to set:
  export LDFLAGS="-L/usr/local/opt/openblas/lib"
  export CPPFLAGS="-I/usr/local/opt/openblas/include"

For pkg-config to find openblas you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig"

我对openblas的主要用例是使用Rscipy。后者_不再支持Macos Accelerate软件包:因此,重定向到brew毫无问题。前者还是会使用啤酒:所以我认为这样做没有什么害处。但是如何做到这一点?

1 个答案:

答案 0 :(得分:0)

两个步骤完成了这项工作:

  • 通过brew卸载openblas

    brew uninstall --ignore-dependencies openblas

  • 重新安装R

    brew install R

  • 手动创建到/usr/local的符号链接:

    sudo ln -s /usr/local/opt/openblas /usr/local

现在我们有R了!

$R

R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin18.6.0 (64-bit)

 .. 

>
相关问题