- 下载并安装VMware WorkStation.
- 下载Debian镜像:http://cdimage.debian.org/debian-cd/8.5.0/multi-arch/iso-cd/debian-8.5.0-amd64-i386-netinst.iso
- 一路安装即可。
- 使用非root用户进入系统
- sudo可以让非root用户具有管理员的权限,安装好的Debian后还不能使用sudo,需要使用root用户登陆后安装sudo命令。切换到root用户下安装sudo
user1@debian:~$ su root
Password:
- 安装sudo
root@debian:/home/user1# apt-get install sudo
- 安装后,就可以给你的帐号设置管理员权限了
root@debian:/home/user1# vi /etc/sudoers
user1 ALL=(ALL:ALL) ALL #这里的user1就是你要给予一定权限的用户
- 安装opencv的依赖
user1@debian:/home/user1# sudo apt-get udpate
user1@debian:/home/user1# sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config python-dev python-numpy libavcodec-dev libavformat-dev libswscale-dev libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
- 获取OpenCV源代码,并切换到tag2.4.6
user1@debian:~/work git clone https://github.com/opencv/opencv.git
user1@debian:~/work$ git checkout 2.4.6
- 编译
user1@debian:~/work/opencv-2.4.6/release$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
user1@debian:~/work/opencv-2.4.6/release$ make
user1@debian:~/work/opencv-2.4.6/release$ sudo make install
- 如果不关心opencv版本,可执行下面命令,替代8,9,10步骤。
user1@debian:~/work$ sudo apt-get install libopencv-dev
引用
网友评论