ubuntu 16.04安装Caffe报错:undefined reference to `google::protobuf...

Ubuntu 16.04, gcc 5.4版本,安装caffe编译时报错如下:
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::Message::InitializationErrorString[abi:cxx11]() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::NameOfEnum[abi:cxx11](google::protobuf::EnumDescriptor const*, int)'
.build_release/lib/libcaffe.so: undefined reference to `google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::empty_string_[abi:cxx11]'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteString(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::ArenaStringPtr::AssignWithDefault(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, google::protobuf::internal::ArenaStringPtr)'
collect2: error: ld returned 1 exit status
Makefile:617: recipe for target '.build_release/tools/upgrade_net_proto_binary.bin' failed
make: *** [.build_release/tools/upgrade_net_proto_binary.bin] Error 1

------
check了protobuf在/usr/local/include下的头文件和/usr/lib下的库都有。不知道问题出在哪? 请老师或遇到过这问题的同学帮忙指导一下。

寒小阳

赞同来自: fish

apt-get重装一下protobuf试试

July_zhu

赞同来自:

你应该是安装anaconda了,而且在里面安装了protobuf相关的东西,和系统里安装的冲突了

挪威的木棉

赞同来自:

我安装了anaconda3,编译的时候也遇到了类似的问题,请问如何解决

yiqiedouhao11

赞同来自:

请问你怎么解决的啊

DLPeng

赞同来自:

同求!!!!

要回复问题请先登录注册