依赖环境安装 ubuntu 16.04
sudo apt-get install git
sudo apt-get install libopencv-dev
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install python-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
下载并编译安装caffe
git clone https://github.com/bvlc/caffe.git
cd caffe
mv Makefile.config.example Makefile.config
(1) 取消Makefile.conf中CPU_ONLY前的注释,目前仅使用CPU编译
(2) 修改Makefile.config中,
INCLUDE_DIRS:=$(PYTHON_INCLUDE) /usr/local/include 修改为
INCLUDE_DIRS:=$(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
(3) 修改Makefile文件,
LIBRARIES +=glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5
LIBRARIES +=glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial
碰到的问题:
1. 编译时报错,找不到hdf5.h
原因: sudo apt-get install libhdf5-serial-dev 安装, 杜英修改Makefile.conf和Makefile (如上)
2. ubuntu 14.04 安装opencv碰到如下问题, 升级为16.04无该问题:
本文档详细介绍了如何在Ubuntu16.04系统中安装必要的依赖环境,并逐步指导如何下载和编译Caffe。此外,还记录了在编译过程中可能遇到的错误及其解决方法。
1379

被折叠的 条评论
为什么被折叠?



