发布时间:2014-09-05 17:42:25作者:知识屋
首先安装g++
hugo@hugo-ThinkPad-Edge:~$ sudo apt-get install g++
hugo@hugo-ThinkPad-Edge:~$ sudo apt-get install g++ automake安装qt4相关
hugo@hugo-ThinkPad-Edge:~$ sudo apt-get install libqt4-dev qt4-dev-tools qt4-designer qt4-doc qt4-demos安装qt4 creator
下载地址: http://qt-project.org/downloads/
下载后是run文件,修改权限并运行,然后图形化界面安装
hugo@hugo-ThinkPad-Edge:~/Downloads$ sudo chmod 777 qt-creator-opensource-linux-x86_64-3.0.1.run配置opencv环境
首先更新和升级系统
hugo@hugo-ThinkPad-Edge:~$ sudo apt-get update
hugo@hugo-ThinkPad-Edge:~$ sudo apt-get upgrade安装必要的依赖环境
sudo apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev libeigen2-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev下载、编译、运行opencv2.4.1(不建议2.4.8,我配置2.4.8后出现问题)
hugo@hugo-ThinkPad-Edge:~/Downloads$ wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.1/OpenCV-2.4.1.tar.bz2
hugo@hugo-ThinkPad-Edge:~/Downloads$ tar jxvf OpenCV-2.4.1.tar.bz2
hugo@hugo-ThinkPad-Edge:~/Downloads$ cd OpenCV-2.4.1
hugo@hugo-ThinkPad-Edge:~/Downloads/Opencv-2.4.1$ mkdir build
hugo@hugo-ThinkPad-Edge:~/Downloads/Opencv-2.4.1$ cd build
hugo@hugo-ThinkPad-Edge:~/Downloads/OpenCV-2.4.1/build$ cmake -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
hugo@hugo-ThinkPad-Edge:~/Downloads/OpenCV-2.4.1/build$ make
hugo@hugo-ThinkPad-Edge:~/Downloads/OpenCV-2.4.1/build$ sudo make install编辑环境变量
hugo@hugo-ThinkPad-Edge:~/Downloads/OpenCV-2.4.1/build$ sudo vim /etc/ld.so.conf.d/opencv.conf
添加opencv库所在路径:
/usr/local/lib
hugo@hugo-ThinkPad-Edge:~/Downloads/OpenCV-2.4.1/build$ sudo ldconfig
hugo@hugo-ThinkPad-Edge:~/Downloads/OpenCV-2.4.1/build$ sudo vim /etc/bash.bashrc在末尾添加:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfigexport PKG_CONFIG_PATH至此,配置成功。
linux一键安装web环境全攻略 在linux系统中怎么一键安装web环境方法
Linux网络基本网络配置方法介绍 如何配置Linux系统的网络方法
Linux下DNS服务器搭建详解 Linux下搭建DNS服务器和配置文件
对Linux进行详细的性能监控的方法 Linux 系统性能监控命令详解
linux系统root密码忘了怎么办 linux忘记root密码后找回密码的方法
Linux基本命令有哪些 Linux系统常用操作命令有哪些
Linux必学的网络操作命令 linux网络操作相关命令汇总
linux系统从入侵到提权的详细过程 linux入侵提权服务器方法技巧
linux系统怎么用命令切换用户登录 Linux切换用户的命令是什么
在linux中添加普通新用户登录 如何在Linux中添加一个新的用户
2012-07-10
CentOS 6.3安装(详细图解教程)
Linux怎么查看网卡驱动?Linux下查看网卡的驱动程序
centos修改主机名命令
Ubuntu或UbuntuKyKin14.04Unity桌面风格与Gnome桌面风格的切换
FEDORA 17中设置TIGERVNC远程访问
StartOS 5.0相关介绍,新型的Linux系统!
解决vSphere Client登录linux版vCenter失败
LINUX最新提权 Exploits Linux Kernel <= 2.6.37
nginx在网站中的7层转发功能