深度学习Caffe平台安装——Ubuntu安装CPU模式的caffe
compilation terminated.
Makefile:581: recipe for target '.build_release/src/caffe/layers/image_data_layer.o' Failed
make: *** [.build_release/src/caffe/layers/image_data_layer.o] Error 1
先将Makefile.config文件中
OPENCV_VERSION :=3 注释掉,只修改USE_OPENCV := 1
修改后的结果:
USE_OPENCV := 1
#OPENCV_VERSION := 3
查找“Derive include and lib directories”一节,修改“LIBRARIES +=”的最后一行(LIBRARIES +=opencv_imgcodecs),增加opencv_imgcodecs
opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs
(此时应该变为LIBRARIES +=opencv_imgcodecsopencv_core opencv_highgui opencv_imgproc opencv_imgcodecs)
保存,退出。
注意:在做前边的基础工作是将Makefile.config文件中
3 注释掉,只修改USE_OPENCV := 1
再在caffe目录下,sudo make all -j8一下,问题解决
=================================================
安装caffe源码:http://caffe.berkeleyvision.org/install_apt_debian.html
安装caffe:http://caffe.berkeleyvision.org/install_apt.html
安装OpenCV:https://linuxconfig.org/install-opencv-on-ubuntu-18-04-bionic-beaver-linux
sudo apt-get install Gparted
编辑source,添加:
sudo gedit /etc/apt/sources.list
deb http://ftp.cn.debian.org/debian sid main contrib non-free deb-src http://ftp.cn.debian.org/debian sid main contrib non-free
deb http://ftp2.cn.debian.org/debian sid main contrib non-free deb-src http://ftp2.cn.debian.org/debian sid main contrib non-free
$ sudo apt update $ sudo apt install build-essential debhelper devscripts # standard package building tools $ sudo apt build-dep [ caffe-cpu | caffe-cuda ] # the most elegant way to pull caffe build dependencies $ apt source [ caffe-cpu | caffe-cuda ] # download the source tarball and extract $ cd caffe-XXXX [ ... optional,customizing caffe code/build ... ] $ dch --local "Modified XXX" # bump package version and write changelog $ debuild -B -j4 # build caffe with 4 parallel jobs (similar to make -j4) [ ... building ...] $ debc # optional,if you want to check the package contents $ sudo debi # optional,install the generated packages $ ls ../ # optional,you will see the resulting packages
debian系linux更新时,提示“由于没有公钥,无法验证下列签名”
https://blog.csdn.net/yjk13703623757/article/details/78998443
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7638D0442B90D010