配置matcaffe 遇到的两个坑

1. 问题

(1) Invalid MEX-file '/root/caffe/matlab/+caffe/private/caffe_.mexa64': /matlab/r2016a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /root/caffe/matlab/+caffe/private/caffe_.mexa64)

(2) 

undefined
symbol:
_ZN2cv8imencodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_11_InputArrayERSt6vectorIhSaIhEERKSB_IiSaIiEE
 
2. 解决方法
(1) export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6
(2) 进入matlab的安装目录``,修改了如下软链接,问题解决
 
libbopencv_core.so.2.4 -> /usr/lib/x86_64-linux-gnu/libopencv_core.so.2.4.9
libopencv_highgui.so.2.4 -> /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9
libopencv_imgproc.so.2.4 -> /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.2.4.9
 

3. 参考来源

http://s1nh.org/post/setup-matcaffe/

 

posted on 2017-10-11 15:11  兔子二  阅读(296)  评论(0编辑  收藏  举报

导航