裝過很多次caffe了,但這個還是遇到了很多奇葩問題,不過以前都是在ubuntu上,這次是在centos上。
1、import error _caffe.so: undefined symbol: _ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE boost_python版本不匹配,我用的python3,因此需要的是libboost_python3需要重新編譯boost
2、編譯boost
https://blog.csdn.net/bodybo/article/details/79962814
將編譯出的libboost_python3.so和libboost_python3.a拷貝到/usr/lib64(絕大部分系統有的是/usr/lib/)
3、.skipped <pstage/lib>libboost_python3.so.1.65.1
死活編譯不出libboost_python3,一直跳過,通過locate pyconfig.h,多試幾個路徑
4、找不到skimage.io模塊”
pip install scikit-image --upgrade --user
5、 return _message.default_pool.AddSerializedFile(serialized_pb) TypeError: expected bytes, str found
編譯生成的caffe_pb2.py有問題 ,用生成好的去替換自己的,我用的是https://blog.csdn.net/qq_33144323/article/details/81280831
6、升級gcc
有的錯誤是gcc版本過低造成的,通過指令升級即可。
https://blog.csdn.net/ysx_cpp/article/details/77187453
7、/usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found
https://blog.csdn.net/u012811841/article/details/77854581
8、找不到cuda*.h
通過which nvcc看nvcc當前路徑,正常應該在cuda,但出來的卻是在/usr/lib/bin下
終端輸入:
export PATH="/usr/local/cuda-9.0/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-9.0/lib64:$LD_LIBRARY_PATH"
9、error: ‘PyThreadState’ has no member named ‘exc_traceback’
python3.7與cython兼容性有點問題,切換到python3.5。。。。
10、安裝mmdetection遇到問題: undefined symbol: __cudaPopCallConfiguration
之前安裝的是cuda9.2,坑很多,切回9.0
cuda cudnn歷史版本下載:https://blog.csdn.net/qq_33485434/article/details/85242970
卸載之前的版本:https://blog.csdn.net/wanzhen4330/article/details/81704474
11、matlab服務器安裝與caffe編譯
https://blog.csdn.net/zziahgf/article/details/78054204
https://blog.csdn.net/tomato_ljl/article/details/79169028
12、編譯matlab接口遇到問題
libharfbuzz.so.0: undefined symbol: FT_Get_Advance
https://github.com/kyamagu/mexopencv/issues/74
在終端運行matlab時,有時候會找不到,給出路徑:export PATH=/usr/local/MATLAB/R2014a/bin:$PATH
13、/usr/bin/ld: /tmp/ccA5JGRP.o: undefined reference to symbol ‘_ZN2cv6String10deallocateEv‘
刪掉自帶的opencv:yum remove opencv make uninstall
14、/usr/bin/ld
: cannot
find
-lcblas
/usr/bin/ld
: cannot
find
-latlas
修改makefile.config
BLAS := atlas
修改后
BLAS :=
open
export CPLUS_INCLUDE_PATH=/你的anconda路徑/include/python2.7
16、/libopencv_core.so.3.4: could not read symbols: Invalid operation
這一類問題通常是缺少軟連接,參考 https://blog.csdn.net/qq_39436605/article/details/80893885
漫漫折騰之路。。。。。