matcaffe 配置遇到的一系列问题

总的步骤:




sudo gedit ~/.bashrc 

1. caffe 中Matlab接口编译好了之后,有可能在Matlab中无法调用caffe。此时路径可能遇到了问题:

    解决办法:将文件拷贝至caffe/matlab文件中运行;

                     或者在文件开头加Matlab路径,如 addpath /home/lucho/caffe/matlab

2.build/tools/caffe :command not found

   make clean 惹的祸,解决: $ sudo make all

3.测试




4,错误:

 /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 'GLIBCXX_3.4.20' not found 

 终端运行strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
看到下面的输出,发现没有GLIBCXX_3.4.20。产生这个问题的原因是GCC版本低需要更新:

参考

但是我的是酱紫解决的:

(记不清了。。。。。。。)

rm -rf libstdc

  1. [root@dyc lib64]# rm -r libstdc++.so.6  
  2. rm:是否删除符号链接 "libstdc++.so.6"?y  
  3. [root@dyc lib64]# ln -s libstdc++.so.6.0.18 libstdc++.so.6  

sudo ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16  /usr/local/MATLAB/R2012a/bin/glnxa64/libstdc++.so.6

Although I check with commands in terminal strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC which shows version GLIBCXX_3.4.15 exists, MATLAB still repeats this error. After googling, I found that MATLAB searches the libraries firstly within its own library path /usr/local/MATLAB/R2012a/bin/glnxa64/ or /usr/local/MATLAB/R2012a/sys/os/glnxa64 and then the system library path. The build-in library is somehow out-of-date, and the version GLIBCXX_3.4.15 doesn’t exist in the old library. I tried to rename the build-in library into another name so that MATLAB can be forced to find the correct one, but there still many other candidates library files with the same name which are prior in the searching order. I need to rename all these old libraries with the same name to help MATLAB direct to correct one, which would be troublesome. Finally, I found an easy way to solve the problem by linking the correct library file with the MATLAB firstly searched old library file, i.e., sudo ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16 /usr/local/MATLAB/R2012a/bin/glnxa64/libstdc++.so.6 After running this command in my terminal, the world calms down.


5.执行

在.sh 所在目录打开终端,然后,执行。如:   $ ./train.sh


阅读更多
个人分类: matlab caffe matcaffe
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭