ubuntu 安装QT5

参考:https://blog.csdn.net/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.csdn.net/ysx_cpp/article/details/70792547


猜你喜欢

转载自blog.csdn.net/csd_meb/article/details/80852767
今日推荐