Linux CentOS7 安装 Qt 5.9.2 和 lableImg
一、安装qt5.9.2
1.安装依赖
yum groupinstall "C Development Tools and Libraries"
yum install libgl libgl-devel
yum install mesa-libGL-devel mesa-libGLU-devel freeglut-devel
yum install libxcb libxcb-devel libXrender libXrender-devel xcb-util-wm xcb-util-wm-devel xcb-util xcb-util-devel xcb-util-image xcb-util-image-devel xcb-util-keysyms xcb-util-keysyms-devel
2.下载Linux 安装包
下载地址
开发者版 http://download.qt.io/development_releases/qt/
发布版 http://download.qt.io/archive/qt/
wget http://download.qt.io/archive/qt/5.9/5.9.2/qt-opensource-linux-x64-5.9.2.run
chmod +x qt-opensource-linux-x64-5.9.2.run
./qt-opensource-linux-x64-5.9.2.run
3.在/etc/ld.so.conf.d下面新建 qt5.9.2-x86_64.conf,写入以下内容
/opt/Qt5.9.2/5.9.2/gcc_64/lib
/opt/Qt5.9.2/Tools/QtCreator/lib
使用ldconfig刷新动态库缓存。
4.vim ~/.bash_profile
export PATH=/opt/Qt5.9.2/gcc_64/bin/:/opt/Qt5.9.2/Tools/QtCreator/bin:$PATH:$HOME/bin
source ~/.bash_profile刷新环境变量
5.输入qtcreator进行验证是否安装成功
参考链接:https://www.cnblogs.com/lsgxeva/p/7688884.html
二、安装labelImg
链接:https://www.cnblogs.com/jack123/p/12985755.html
然后发现一个问题:plugin "xcb" in "" even though it was found.
输入命令:
export QT_DEBUG_PLUGINS=1
python3 labelImg.py
查看发现是这一行有错: lableimg libxcb-render-util.so.0 => not found
折腾一番后发现是PyQt5的版本高了,安装的是5.15点几,重装一个
yum install PyQt5==5.12.3
python3 labelImg.py
ok了。