Mac 安装caffe 错误:make: *** [.build_release/src/caffe/util/db.o] Error 1

In file included from /usr/local/include/leveldb/iterator.h:20:
/usr/local/include/leveldb/status.h:27:11: error: expected ';' at end of declaration list
  Status() noexcept : state_(nullptr) {}
          ^
/usr/local/include/leveldb/status.h:33:23: error: expected ';' at end of declaration list
  Status(Status&& rhs) noexcept : state_(rhs.state_) { rhs.state_ = nullptr; }
                      ^
/usr/local/include/leveldb/status.h:103:16: error: 'Status' is missing exception specification 'throw()'
inline Status::Status(const Status& rhs) {
               ^
/usr/local/include/leveldb/status.h:24:22: note: previous declaration is here
class LEVELDB_EXPORT Status {
                     ^
/usr/local/include/leveldb/status.h:115:48: error: expected function body after function declarator
inline Status& Status::operator=(Status&& rhs) noexcept {
                                               ^
4 errors generated.
make: *** [.build_release/src/caffe/util/db.o] Error 1

改变Makefile.config配置

# To customize your choice of compiler, uncomment and set the following.
# N.B. the default for Linux is g++ and the default for OSX is clang++
# CUSTOM_CXX := g++
CUSTOM_CXX := clang++ -std=c++11

即可解决

你可能感兴趣的:(Mac 安装caffe 错误:make: *** [.build_release/src/caffe/util/db.o] Error 1)