caffe bug && some useful library
1、relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC #2171
解決方案:
https://github.com/BVLC/caffe/issues/2171
2、libstdc++.so.6: version `GLIBCXX_3.4.21' not found
解決方案:安裝一個3.4.21版本的gcc
conda install libgcc
參考資料:
https://blog.csdn.net/a8039974/article/details/78544209
3、protoc: error while loading shared libraries: libprotoc.so.14: cannot open shared object file: No such file or directory
解決方案:將protoc安裝的庫路徑加入到系統變數
sudo vim ld.so.conf
然後將/usr/local/lib貼上到檔案中
最後執行:
sudo ldconfig
讓環境變數生效。
參考資料:
https://blog.csdn.net/weixin_37251044/article/details/79139906
4、系統無法識別protobuf
可以直接用protoc生成cpp檔案:
protoc.exe --cpp_out=./*.proto
參考資料:
https://blog.csdn.net/shimazhuge/article/details/78091113
5、將anaconda新增到系統環境變數中
先開啟.bashrc檔案
vim ~/.bashrc
在末尾新增:
export PATH=/home/grant/anaconda2/bin:$PATH
然後source一下,讓更改後的環境變數生效
source ~/.bashrc
參考資料:
https://www.linuxidc.com/Linux/2016-08/134259.htm
6、cmake安裝
下載cmake的source檔案,並解壓,進入壓縮檔案,執行:
./bootstrap
make -j8
sudo make install
參考資料:
https://blog.csdn.net/lj402159806/article/details/76408597/
7、原始碼編譯opencv後,python中:
import cv2
出現一個錯誤,找不到cv2
解決方案:
將build->install->lib路徑下的cv2.so檔案拷貝到anaconda2->lib->python2.7->site-packages路徑下即可
8、ImportError: No module named google.protobuf.internal
解決方案:
pip install argparse --user
pip install PyHamcrest --user
pip install protobuf --user
參考資料:
https://www.cnblogs.com/yyxf1413/p/7927985.html
~~~未完待續~~~