在Mac上安装Caffe错误:“严重错误:找不到'cblas.h'文件" [英] Install Caffe on Mac error: "fatal error: 'cblas.h' file not found"
问题描述
I've been following this guide to install on my El Capitan macbook pro, using CMake to build the makefile. However, when I attempt to make, I run into the error of missing the cblas.h file. I successfully reinstalled openblas with:
$ brew uninstall openblas; brew install --fresh -vd openblas
并添加两个构建标记:
LDFLAGS: -L/usr/local/opt/openblas/lib
CPPFLAGS: -I/usr/local/opt/openblas/include
但是我仍然收到错误消息.然后,我按照建议的此处重新安装了CUDA和xcode-select安装工具. .
However I still get the error. Then I reinstalled CUDA and xcode-select install tools as recommended here.
感谢任何关于为什么make看不到我的cblas.h文件的建议/进一步的猜测!
Any recommendations/further speculation about why make doesn't see my cblas.h file is appreciated!
推荐答案
在您的问题中,我看到了cmake
,但是在提供的链接Makefile.config
中.
In your question I see cmake
, but in provided link Makefile.config
.
如果您仍要继续执行 cmake :
首先,构建脚本未损坏-我在Yosemite上使用最新的 master 分支( 2016-02-25),但如果已经完成,则应稍作调整
first of all, build script is NOT broken - I tried it on Yosemite with the latest master branch (2016-02-25), but you should slightly adjust it if you already made
brew uninstall openblas; brew install --fresh -vd openblas
只需使用其他参数运行cmake:
Just run your cmake with additional arguments:
cmake -DCMAKE_CXX_FLAGS=-I/usr/local/opt/openblas/include <path to your sources>
然后是常规的make或xcode构建(取决于您使用的生成器).
and then usual make or xcode build (depends on what generator you use).
此后,它已成功构建在我的系统上.
After this it was successfully built on my system.
UPD :您还可以在Accelerate.framework
(vecLib
)中使用库,而不是 openblas .
UPD: you can also use libraries in Accelerate.framework
(vecLib
) instead of openblas.
这篇关于在Mac上安装Caffe错误:“严重错误:找不到'cblas.h'文件"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!