我正在尝试在Ubuntu 14计算机上编译软件OpenPose。安装脚本安装Caffe。在安装Caffe时,我收到以下错误消息:
CXX tools/upgrade_net_proto_text.cpp
CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
.build_release/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imdecode(cv::_InputArray const&, int)'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/upgrade_net_proto_text.bin] Error 1
从here,我尝试运行ldconfig
,我使用OpenCV 3.2.0,所以我在makefile中取消注释。我也尝试在~/.bashrc
更新OpenCV路径,但我不确定我是否正确完成了。我做了:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
在每个步骤之后,我再次运行安装脚本,但每次都失败,并显示相同的错误消息(如上所示)。
答案 0 :(得分:4)
到目前为止,我还没有见过任何人使用openCV 3.2.0成功安装了caffe,我遇到了同样的问题,我所做的就是降级到OpenCV 3.1。另外一个问题是丢失的模块你应该在opencv上安装的open_contrib,id引用你的答案也与OpenPose有关here