opencv3-ubuntu16.04-install
|
1 | sudo apt-get install cmake |
1 | sudo apt-get install cmake |
1 | mv sources.list /etc/apt/sources.list |
更新源的配置,注意文件存放的位置
文件sources.list和raspi.list具体内容如下
sources.list文件:
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
deb http://mirrors.aliyun.com/raspbian/raspbian/ stretch main contrib non-free rpi
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
deb http://mirrors.neusoft.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
raspi.list文件:1
2
3
4deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main ui
deb http://mirrors.aliyun.com/raspbian/raspbian/ stretch main ui
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main ui
deb http://mirrors.neusoft.edu.cn/raspbian/raspbian/ stretch main ui
在终端执行更新命令:1
2sudo apt-get update
sudo apt-get upgrade
1 | sudo apt-get install build-essential cmake git pkg-config |
注意:降级安装
有些安装包依赖的版本低需要降级安装,如下,对depends后面的进行降级安装1
sudo aptitude install xxxx
1 | git clone https://github.com/opencv/opencv.git |
1 | cmake dir/of/opencv/source |