参考:https://blog.youkuaiyun.com/wuweifeng_2017/article/details/78322249,完成安装和配置
注意
1 路径配置
在命令端口中输入命令:sudo vim /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf 打开default.conf文件。
将第一行改为自己安装路径(这是我的安装路径/home/wwf/software/Qt5.8.0)下的bin目录的路径,第二行改为Qt5.8.0目录的路径。
2 安装 libgl1-mesa-dev
在命令端口中输入命令:sudo apt-get install libgl1-mesa-dev 进行安装。
3 另外有个问题
CMake Error at CMakeLists.txt:20 (find_package): By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5Core", but CMake did not find one. Could not find a package configuration file provided by "Qt5Core" with any of the following names: Qt5CoreConfig.cmake qt5core-config.cmake Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set "Qt5Core_DIR" to a directory containing one of the above files. If "Qt5Core" provides a separate development package or SDK, be sure it has been installed.https://blog.youkuaiyun.com/ysx_cpp/article/details/70792547
本文详细介绍了如何安装Qt5并正确配置环境变量的过程。包括修改default.conf文件以指向Qt安装路径,安装必要的依赖包libgl1-mesa-dev,以及解决CMake在查找Qt5Core配置文件时出现的问题。
551

被折叠的 条评论
为什么被折叠?



