Caffe: make: *** [.build_release/src/caffe/util/blocking_queue.o] 错误 1

Caffe: make: *** [.build_release/src/caffe/util/blocking_queue.o] Error 1

当我在 ubuntu 16.04 中制作 caffe 时,出现以下错误:

CXX src/caffe/util/blocking_queue.cpp
In file included from /usr/local/include/boost/bind/bind.hpp:2187:0,
                 from /usr/local/include/boost/bind.hpp:22,
                 from /usr/local/include/boost/thread/detail/thread.hpp:30,
                 from /usr/local/include/boost/thread/thread_only.hpp:22,
                 from /usr/local/include/boost/thread/thread.hpp:12,
                 from /usr/local/include/boost/thread.hpp:13,
                 from src/caffe/util/blocking_queue.cpp:1:
/usr/local/include/boost/bind/bind_mf_cc.hpp:52:6: error: expected unqualified-id before ‘:>’ token
     >:>type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const BOOST_BIND_MF_NOEXCEPT, A1 a1)
      ^
Makefile:584: recipe for target '.build_release/src/caffe/util/blocking_queue.o' failed
make: *** [.build_release/src/caffe/util/blocking_queue.o] Error 1

有人知道如何解决吗?非常感谢!

您使用的 g++ 是哪个版本?确保它至少是版本 4.8

我建议你安装g++-4.8并在Makefile.config中选择它(CUSTOM_CXX :=g++-4.8)然后重新编译。

还要确保您使用的 boost 库版本与您正在使用的 g++ 的给定版本相对应。