Build caffe with Python ( cannot find -lboost_python3 )

扶醉桌前 提交于 2019-12-13 16:25:22

问题


I'm trying to build caffe with python but it keep saying this

CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp
/usr/bin/ld: cannot find -lboost_python3
collect2: error: ld returned 1 exit status
make: *** [python/caffe/_caffe.so] Error 1

This is what I get when I try to locate boost_python

$ sudo locate boost_python
/usr/lib/x86_64-linux-gnu/libboost_python-py27.a
/usr/lib/x86_64-linux-gnu/libboost_python-py27.so
/usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0
/usr/lib/x86_64-linux-gnu/libboost_python-py33.a
/usr/lib/x86_64-linux-gnu/libboost_python-py33.so
/usr/lib/x86_64-linux-gnu/libboost_python-py33.so.1.55.0
/usr/lib/x86_64-linux-gnu/libboost_python-py34.a
/usr/lib/x86_64-linux-gnu/libboost_python-py34.so
/usr/lib/x86_64-linux-gnu/libboost_python-py34.so.1.55.0
/usr/lib/x86_64-linux-gnu/libboost_python.a
/usr/lib/x86_64-linux-gnu/libboost_python.so

I've add this path also

## .bashrc
export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu":$LD_LIBRARY_PATH

Any idea why is that happing?


回答1:


I've found the problem. it turned out that it tries to look for something with that name of libboost_python3.so after changing the name in Makefile.config from boost_python3 to boost_python-py34, it worked just fine!



来源:https://stackoverflow.com/questions/40616527/build-caffe-with-python-cannot-find-lboost-python3

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!