Deep learning 安装Caffe时链接库出错:

Deep learning 安装Caffe时链接库出错:,deep-learning,caffe,pycaffe,matcaffe,Deep Learning,Caffe,Pycaffe,Matcaffe,我已经安装了很多次Caffe。这一次我尝试下载最新版本,但是,在安装过程中我遇到了很多问题。我不知道如何解决它 我尝试了两种方法:按make构建和全部生成。 通过cmake,我面对了这个问题: -- The C compiler identification is GNU 4.6.4 -- The CXX compiler identification is GNU 4.6.4 -- Check for working C compiler: /usr/bin/cc -- Check for w

我已经安装了很多次Caffe。这一次我尝试下载最新版本,但是,在安装过程中我遇到了很多问题。我不知道如何解决它

我尝试了两种方法:
按make构建
全部生成
。 通过cmake,我面对了这个问题:

-- The C compiler identification is GNU 4.6.4
-- The CXX compiler identification is GNU 4.6.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
--   chrono
--   date_time
--   atomic
-- Found GFlags: /usr/include  
-- Found gflags  (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)
-- Found Glog: /usr/include  
-- Found glog    (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so)
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so  
-- Found PROTOBUF Compiler: /usr/bin/protoc
-- Found HDF5: /home/user/anaconda2/envs/empty/lib/libhdf5_hl.so;/home/user/anaconda2/envs/empty/lib/libhdf5.so;/home/user/anaconda2/envs/empty/lib/libhdf5_hl.so;/home/user/anaconda2/envs/empty/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/librt.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/home/user/anaconda2/envs/empty/lib/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.8.17") 
-- Found LMDB: /usr/include  
-- Found lmdb    (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/liblmdb.so)
-- Found LevelDB: /usr/include  
-- Found LevelDB (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libleveldb.so)
-- Found Snappy: /usr/include  
-- Found Snappy  (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libsnappy.so)
-- CUDA detected: 7.5
-- Found cuDNN: ver. 5.1.5 found (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libcudnn.so)
-- Automatic GPU detection failed. Building for all known architectures.
-- Added CUDA NVCC flags for: sm_20 sm_21 sm_30 sm_35 sm_50 sm_60 sm_61
-- OpenCV found (/home/user/anaconda2/envs/empty/share/OpenCV)
-- Found Atlas: /usr/include  
-- Found Atlas (include: /usr/include library: /usr/lib/libatlas.so lapack: /usr/lib/liblapack.so
-- Found PythonInterp: /home/user/anaconda2/envs/empty/bin/python2.7 (found suitable version "2.7.13", minimum required is "2.7") 
-- Found PythonLibs: /home/user/anaconda2/envs/empty/lib/libpython2.7.so (found suitable version "2.7.13", minimum required is "2.7") 
-- Found NumPy: /home/user/anaconda2/envs/empty/lib/python2.7/site-packages/numpy/core/include (found suitable version "1.11.3", minimum required is "1.7.1") 
-- NumPy ver. 1.11.3 found (include: /home/user/anaconda2/envs/empty/lib/python2.7/site-packages/numpy/core/include)
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   python
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Found Git: /usr/bin/git (found version "2.7.4") 
-- 
-- ******************* Caffe Configuration Summary *******************
-- General:
--   Version           :   1.0.0
--   Git               :   1.0-dirty
--   System            :   Linux
--   C++ compiler      :   /usr/bin/c++
--   Release CXX flags :   -O3 -DNDEBUG -fPIC -Wall -Wno-sign-compare -Wno-uninitialized
--   Debug CXX flags   :   -g -fPIC -Wall -Wno-sign-compare -Wno-uninitialized
--   Build type        :   Release
-- 
--   BUILD_SHARED_LIBS :   ON
--   BUILD_python      :   ON
--   BUILD_matlab      :   OFF
--   BUILD_docs        :   ON
--   CPU_ONLY          :   OFF
--   USE_OPENCV        :   ON
--   USE_LEVELDB       :   ON
--   USE_LMDB          :   ON
--   USE_NCCL          :   OFF
--   ALLOW_LMDB_NOLOCK :   OFF
-- 
-- Dependencies:
--   BLAS              :   Yes (Atlas)
--   Boost             :   Yes (ver. 1.58)
--   glog              :   Yes
--   gflags            :   Yes
--   protobuf          :   Yes (ver. 2.6.1)
--   lmdb              :   Yes (ver. 0.9.17)
--   LevelDB           :   Yes (ver. 1.18)
--   Snappy            :   Yes (ver. 1.1.3)
--   OpenCV            :   Yes (ver. 3.2.0)
--   CUDA              :   Yes (ver. 7.5)
-- 
-- NVIDIA CUDA:
--   Target GPU(s)     :   Auto
--   GPU arch(s)       :   sm_20 sm_21 sm_30 sm_35 sm_50 sm_60 sm_61
--   cuDNN             :   Yes (ver. 5.1.5)
-- 
-- Python:
--   Interpreter       :   /home/user/anaconda2/envs/empty/bin/python2.7 (ver. 2.7.13)
--   Libraries         :   /home/user/anaconda2/envs/empty/lib/libpython2.7.so (ver 2.7.13)
--   NumPy             :   /home/user/anaconda2/envs/empty/lib/python2.7/site-packages/numpy/core/include (ver 1.11.3)
-- 
-- Documentaion:
--   Doxygen           :   No
--   config_file       :   
-- 
-- Install:
--   Install path      :   /home/user/caffe/build/install
-- 
-- Configuring done
CMake Warning (dev) in src/caffe/CMakeLists.txt:
  Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
  interface.  Run "cmake --help-policy CMP0022" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  Target "caffe" has an INTERFACE_LINK_LIBRARIES property which differs from
  it's LINK_INTERFACE_LIBRARIES properties.

  INTERFACE_LINK_LIBRARIES:

    proto;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so; 
[……]

似乎图书馆之间存在着连接问题

然后我使用了
makeclean
并尝试通过
make-j4
进行安装。编译了一段时间(编译了几个层)后,该层还会出现以下错误:

[...]
CXX .build_release/src/caffe/proto/caffe.pb.cc
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so.1.0.0
CXX/LD -o .build_release/tools/caffe.bin
CXX/LD -o .build_release/tools/test_net.bin
.build_release/lib/libcaffe.so: **undefined reference to `google::protobuf**::internal::WireFormatLite::WriteStringMaybeAliased(int, std::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::io::CodedOutputStream::WriteStringWithSizeToArray(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::Message::GetTypeName() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::StringTypeHandlerBase::Delete(std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))'
.build_release/lib/libcaffe.so: undefined reference to `leveldb::DB::Open(leveldb::Options const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, leveldb::DB**)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::Message::DebugString() const'
.build_release/lib/libcaffe.so: undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)'
[...]
Makefile:625: recipe for target '.build_release/tools/upgrade_net_proto_binary.bin' failed
make: *** [.build_release/tools/upgrade_net_proto_binary.bin] Error 1
[…]
CXX.build\u release/src/caffe/proto/caffe.pb.cc
AR-o.build\u release/lib/libcaffe.a
LD-o.build\u release/lib/libcaffe.so.1.0.0
CXX/LD-o.build\u发行版/tools/caffe.bin
CXX/LD-o.build\u release/tools/test\u net.bin
.build_release/lib/libcaffe.so:*未定义对“google::protobuf**::internal::WireFormattLite::WriteStringMaybeAliased(int,std::basic_string const&,google::protobuf::io::CodeDoutpStream*)的引用”
.build_release/lib/libcaffe.so:对“google::protobuf::io::CodeDoutpStream::WriteStringWithSizeToArray(std::basic_字符串常量&,无符号字符*)的未定义引用”
.build_release/lib/libcaffe.so:对“google::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream*,std::basic_string*)”的未定义引用
.build_release/lib/libcaffe.so:对“google::protobuf::Message::GetTypeName()const”的未定义引用
.build_release/lib/libcaffe.so:对“google::protobuf::internal::StringTypeHandlerBase::Delete(std::basic_string*)”的未定义引用
.build_release/lib/libcaffe.so:对“google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*,void(*)(std::basic_string const&)”的未定义引用
.build_release/lib/libcaffe.so:leveldb::DB::Open(leveldb::Options const&,std::basic_string const&,leveldb::DB**)的未定义引用
.build_release/lib/libcaffe.so:对“google::protobuf::Message::DebugString()const”的未定义引用
.build_release/lib/libcaffe.so:对“google::base::CheckOpMessageBuilder::NewString()的未定义引用”
.build_release/lib/libcaffe.so:对“google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int,std::basic_string const&,google::protobuf::io::CodeDoutpStream*)的未定义引用
[...]
Makefile:625:目标“.build\u release/tools/upgrade\u net\u proto\u binary.bin”的配方失败
make:**[.build\u release/tools/upgrade\u net\u proto\u binary.bin]错误1
在上一个版本的安装中,我删除了protobuf并安装了它,之后它就可以工作了。我尝试了很多次,但仍然得到相同的错误。我真的非常感谢任何帮助/提示。我是否应该向“./bashrc”添加特定路径