去官网下载qt-opensource-linux-x64-5.7.0.run,到“下载”目录
Ctrl+Alt+T打开终端
cd /home/jv/下载
sudo mv qt-opensource-linux-x64-5.7.0.run /opt
cd /opt 个人习惯把软件安装到opt文件夹中
sudo chmod +x qt-opensource-linux-x64-5.7.0.run
sudo ./qt-opensource-linux-x64-5.7.0.run
弹出熟悉的GUI,默认安装即可
【图标放到左侧任务栏】
1.进入这个文件夹
/usr/share/applications
2.找到安装QT图标
3.直接拖到侧边菜单栏,就行了
【配置opencv】
sudo apt install qt-sdk
sudo apt install cmake
sudo apt 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
解压下载的opencv压缩包(我的在下载目录),解压后放到opt文件夹(否则make过程容易出错),然后在opencv目录下新建Release文件夹
cd /home/jv/下载
unzip opencv-2.4.13.zip
sudo mv /home/jv/下载/opencv-2.4.13 /opt
cd opencv-2.4.13/
sudo mkdir Release
cd Release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -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_GTK=ON -D WITH_OPENGL=ON ..
make
sudo make install
【将opencv加入系统环境变量】
sudo gedit /etc/ld.so.conf
在下一行加入
/usr/loacal/lib
保存,关闭
sudo ldconfig
sudo gedit /etc/bash.bashrc
末尾加入
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
保存,关闭
source /etc/bash.bashrc
opt目录中的opencv文件夹可以删除,节省空间
sudo rm -r /opt/opencv-2.4.13/
完成!!!