一、更新
apt-get update
apt-get upgrade
二、安装python3
apt install python3
apt install python3-pip
三、安装依赖
1 apt-get install libprotobuf-dev
2 apt-get install libleveldb-dev
3 apt-get install libsnappy-dev
4 apt-get install libopencv-dev
5 apt-get install libhdf5-serial-dev
6 apt-get install protobuf-compiler
7 apt-get install libgflags-dev
8 apt-get install libgoogle-glog-dev
9 apt-get install liblmdb-dev
10 apt-get install libatlas-base-dev
11 pip3 install scikit-build
12 apt-get install python-numpy
13 apt-get install --no-install-recommends libboost-all-dev
四、编译opencv4
1、复制opencv4源代码如opencv4,cd opencv4
2、mkdir build/cd build
3、cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local …
4、make all
5 make install
五、编译caffe
1、复制caffe源代码(修改后的)如caffe,cd caffe
2、mkdir build/cd build
cp Makefile.config.example Makefile.config
3、cmake -D CMAKE_BUILD_TYPE=Release -D CPU_ONLY=ON …
4、make all
5 make install
六、安装python opencv
pip3 install opencv-python
参考网址
https://www.cnblogs.com/acgoto/p/11570188.html