Yiqun Liu
Yiqun Liu

Reputation: 503

Caffe: Almost done but stuck at the last step

I'm currently setting up caffe with python on my Macbook. I swear all the prerequisites are ok, but it returns error when I tried to build caffe. What's wrong? Here is the console:

/bin/sh: /usr/local/cuda/bin/nvcc: No such file or directory
awk: syntax error at source line 1
context is
   {exit  >>>  < <<<  7.0;}
awk: illegal statement at source line 1
CXX src/caffe/blob.cpp
CXX src/caffe/common.cpp
CXX src/caffe/data_transformer.cpp
CXX src/caffe/internal_thread.cpp
/bin/sh: .build_release/src/caffe/blob.o.warnings.txt: Permission denied
/bin/sh: .build_release/src/caffe/common.o.warnings.txt: Permission denied
/bin/sh: .build_release/src/caffe/data_transformer.o.warnings.txt: Permission denied
/bin/sh: .build_release/src/caffe/internal_thread.o.warnings.txt: Permission denied
cat: .build_release/src/caffe/common.o.warnings.txt: No such file or directory
In file included from src/caffe/blob.cpp:4:
In file included from ./include/caffe/blob.hpp:8:
In file included from ./include/caffe/common.hpp:19:
./include/caffe/util/device_alternate.hpp:34:10: fatal error: 'cublas_v2.h' file not found
#include <cublas_v2.h>
     ^
1 error generated.
cat: .build_release/src/caffe/data_transformer.o.warnings.txt: No such file or directory
make: *** [.build_release/src/caffe/common.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [.build_release/src/caffe/blob.o] Error 1
make: *** [.build_release/src/caffe/data_transformer.o] Error 1
cat: .build_release/src/caffe/internal_thread.o.warnings.txt: No such file or directory
make: *** [.build_release/src/caffe/internal_thread.o] Error 1

Ok, Now the aforementioned problem have been solved, but there is another one, could someone help me?

sh-3.2# cd /Users/Leo/Documents/caffe
sh-3.2# make all
CXX src/caffe/blob.cpp
In file included from src/caffe/blob.cpp:4:
In file included from ./include/caffe/blob.hpp:10:
In file included from ./include/caffe/syncedmem.hpp:7:
In file included from ./include/caffe/util/math_functions.hpp:11:
./include/caffe/util/mkl_alternate.hpp:11:10: fatal error: 'cblas.h' file not found
#include <cblas.h>
     ^
1 error generated.
make: *** [.build_release/src/caffe/blob.o] Error 1

Upvotes: 1

Views: 2420

Answers (2)

Tiago
Tiago

Reputation: 1991

For anyone else that finds this. The CUDA dev kit is only needed if you have an Nvidia card on the machines you'll use this on. For most Mac users this likely isn't the case (check your hardware specs). If you don't have that kind of graphics card, you can't use CUDA. Just disable it before compiling Caffe:

  • In your caffe dir, edit the Makefile.config
  • Uncomment this line: CPU_ONLY := 1 to indicate CUDA won't be needed.

Upvotes: 1

Geeocode
Geeocode

Reputation: 5797

I guess you have to install cuda dev. kit.

Upvotes: 0

Related Questions