Ubuntu16安装caffe的一些小教训!!!
作者:互联网
一不小心把Ubuntu14升级到了16,折腾了好几天才把caffe安装上,建议在Ubuntu14的基础上进行安装,如果caffe官方能够支持16或者以上的版本就更好了。。。
我的环境是anaconda3+cuda10.1
首先应该安装opencv,试了opencv2.4.9,又试了opencv3.1,从编译方式安装都没有成功。
后来在网上参考到:opencv3以上的build不同之前
需要opencv-contrib,opencv两个文件。
完成opencv后,安装caffe官网地址安装各类库。
下面主要记录本人的一个错误:
make all: error adding symbols: DSO missing from command line。
CXX/LD -o .build_release/examples/cpp_classification/classification.bin
/usr/bin/ld: warning: libopencv_core.so.3.3, needed by /usr/local/lib/libopencv_imgcodecs.so, may conflict with libopencv_core.so.2.4
/usr/bin/ld: .build_release/examples/cpp_classification/classification.o: undefined reference to symbol ‘_ZN2cv6String10deallocateEv’
//usr/local/lib/libopencv_core.so.3.3: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [.build_release/examples/cpp_classification/classification.bin] Error 1
(base) XXXX@amax2:~/caffe$
解决方法:
在caffe根目录下修改Makefile.config文件:
#Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/local/lib/x86_64-linux-gnu
即可。
ps:关于有的文章写的软链接,我没有使用到。
标签:教训,lib,classification,libopencv,caffe,usr,Ubuntu16,local 来源: https://blog.csdn.net/awesomeeedd/article/details/104459974