OpenCV2.4.1所需安装包(来自官方的opencv_tutorials.pdf)
1. GCC 4.4.x or later
sudo apt-get install build-essential
2. CMake 2.6 or later (可以把cmake-gui也安装了)
sudo apt-get install cmake camke-gui
3.Subversion(svn) client
sudo apt-get install svn
4. GTK+2.x or higher, including headers (在包:libgtk2.0-dev)
sudo apt-get install libgtk2.0-dev
5.pkgconfig
6.Python 2.6 or later and Numpy 1.5 or later with developer packages
sudo apt-get install python-dev python-numpy
7. ffmpeg or libav development packages:
sudo apt-get install libavcodec-dev libavformat-dev libswcale-dev
8.[可选] libdc1394 2.x
9.[可选] libjpeg-dev, libpng-dev, libtiff-dev, libjasper-dev
可以复制下面的代码,做成一个sh文件运行就是,svn的安装见附注
方法:1). ~$touch install.sh
2). 把下面代码复制到文件install.sh
3). ~$chmod 775 install.sh
4). ~$sh install.sh
sudo apt-get install build-essential cmake cmake-gui libgtk2.0-dev python-dev python-numpy libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install build-essential cmake cmake-gui libgtk2.0-dev python-dev python-numpy libavcodec-dev libavformat-dev libswscale-dev
附注:svn 下载官方地址
svn 安装详情
ps:在Ubuntu12.04下测试通过