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
~~~未完待续~~~