【问题标题】:.build_release/lib/libcaffe.so: undefined reference to `boost::python::import(boost::python::str)'.build_release/lib/libcaffe.so:未定义对`boost::python::import(boost::python::str)'的引用
【发布时间】:2016-08-24 00:16:28
【问题描述】:

Python2.7 和 Ubuntu15.10 出现此错误:

jalal@klein:~/computer_vision/py-faster-rcnn/caffe-fast-rcnn$ make -j8 && make pycaffe

CXX/LD -o .build_release/tools/compute_image_mean.bin
CXX/LD -o .build_release/tools/upgrade_net_proto_binary.bin
CXX/LD -o .build_release/tools/convert_imageset.bin
CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
CXX/LD -o .build_release/tools/caffe.bin
CXX/LD -o .build_release/tools/extract_features.bin
CXX/LD -o .build_release/tools/upgrade_solver_proto_text.bin
CXX/LD -o .build_release/examples/cpp_classification/classification.bin
/usr/bin/ld: warning: libboost_system.so.1.58.0, needed by .build_release/lib/libcaffe.so, may conflict with libboost_system.so.1.61.0
/usr/bin/ld: warning: libboost_thread.so.1.58.0, needed by .build_release/lib/libcaffe.so, may conflict with libboost_thread.so.1.61.0
.build_release/lib/libcaffe.so: undefined reference to `boost::python::throw_error_already_set()'
.build_release/lib/libcaffe.so: undefined reference to `boost::python::import(boost::python::str)'
.build_release/lib/libcaffe.so: undefined reference to `PyEval_CallFunction'
.build_release/lib/libcaffe.so: undefined reference to `typeinfo for boost::python::error_already_set'
.build_release/lib/libcaffe.so: undefined reference to `PyErr_Print'

我该如何解决这个问题? 我已经安装了boost。 来自https://github.com/rbgirshick/py-faster-rcnn

我已经跑过了:

sudo apt-get install build-essential g++ python-dev autotools-dev libicu-dev build-essential libbz2-dev libboost-all-dev

还有:

sudo apt-get install libboost-python-dev 

【问题讨论】:

    标签: python c++ ubuntu boost caffe


    【解决方案1】:

    从源代码安装 Boost 对我有用! 从其官网下载Boost源代码后:

    sudo ./bootstrap.sh --prefix=/usr/local
    ./b2
    sudo ./b2 install
    

    【讨论】:

      猜你喜欢
      • 2015-08-23
      • 1970-01-01
      • 1970-01-01
      • 2020-12-14
      • 2012-11-08
      • 2014-12-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多