错误:caffe.so: undefined symbol: _ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE解决方法

caffe编译成功后,在导入测试的时候,出现以下错误.
在命令行输入:

import caffe

回车。出现以下错误.

Traceback (most recent call last):
  File "", line 1, in <module>
  File "/home/li.guangyao/Programming/caffe/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
  File "/home/li.guangyao/Programming/caffe/python/caffe/pycaffe.py", line 13, in <module>
    from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: /home/li.guangyao/Programming/caffe/python/caffe/_caffe.so: undefined symbol: _ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE

解决方法:
测试boost的版本,需要大于1.55.
在终端输入:

sudo apt-get install --no-install-recommends libboost-all-dev

在这里插入图片描述


源码编译boost见:
Caffe-SSD错误:.build_release/lib/libcaffe.so: undefined reference to `boost::re_detail_106501::cpp_reg

你可能感兴趣的:(Caffe)