ubuntu16.04下qt5.14报错:/home/XXXXX/Qt5.14.1/5.14.1/gcc_64/include/QtGui/qopengl.h:141: error: GL/
2023-06-15 06:09:37 阅读次数:131
qt,ubuntu
最近在学qt,由于qt开发的文件具有良好的移植性,所以想在liunx环境下编译,结果报错不断,心态崩了
错误:/home/XXXXXi/Qt5.14.1/5.14.1/gcc_64/include/QtGui/qopengl.h:141:
error: GL/gl.h: No such file or directory
![ubuntu16.04下qt5.14报错:/home/XXXXX/Qt5.14.1/5.14.1/gcc_64/include/QtGui/qopengl.h:141: error: GL/ ubuntu16.04下qt5.14报错:/home/XXXXX/Qt5.14.1/5.14.1/gcc_64/include/QtGui/qopengl.h:141: error: GL/](https://ctyun-collect-0531.gdoss.xstore.ctyun.cn/files/2023/04/13/f0fd2aabeb2e4f13a9f837da524ab028.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=/resize,m_fixed,w_1184)
解决方法
打开终端,执行两条指令
sudo apt-get install mesa-common-dev
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
![ubuntu16.04下qt5.14报错:/home/XXXXX/Qt5.14.1/5.14.1/gcc_64/include/QtGui/qopengl.h:141: error: GL/ ubuntu16.04下qt5.14报错:/home/XXXXX/Qt5.14.1/5.14.1/gcc_64/include/QtGui/qopengl.h:141: error: GL/](https://ctyun-collect-0531.gdoss.xstore.ctyun.cn/files/2023/04/13/6d7763969fd54d96a57857cbba7d30ac.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=/resize,m_fixed,w_1184)
![ubuntu16.04下qt5.14报错:/home/XXXXX/Qt5.14.1/5.14.1/gcc_64/include/QtGui/qopengl.h:141: error: GL/ ubuntu16.04下qt5.14报错:/home/XXXXX/Qt5.14.1/5.14.1/gcc_64/include/QtGui/qopengl.h:141: error: GL/](https://ctyun-collect-0531.gdoss.xstore.ctyun.cn/files/2023/04/13/3c00ad44f1e5417fbecd57276397486e.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=/resize,m_fixed,w_1184)
![ubuntu16.04下qt5.14报错:/home/XXXXX/Qt5.14.1/5.14.1/gcc_64/include/QtGui/qopengl.h:141: error: GL/ ubuntu16.04下qt5.14报错:/home/XXXXX/Qt5.14.1/5.14.1/gcc_64/include/QtGui/qopengl.h:141: error: GL/](https://ctyun-collect-0531.gdoss.xstore.ctyun.cn/files/2023/04/13/02462a8ae35548b191d881592a641396.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=/resize,m_fixed,w_1184)
> 再运行就成功了
![ubuntu16.04下qt5.14报错:/home/XXXXX/Qt5.14.1/5.14.1/gcc_64/include/QtGui/qopengl.h:141: error: GL/ ubuntu16.04下qt5.14报错:/home/XXXXX/Qt5.14.1/5.14.1/gcc_64/include/QtGui/qopengl.h:141: error: GL/](https://ctyun-collect-0531.gdoss.xstore.ctyun.cn/files/2023/04/13/687e7f6ef082423bbbb03b61a5a5ae26.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=/resize,m_fixed,w_1184)
版权声明:本文内容来自第三方投稿或授权转载,原文地址:https://blog.51cto.com/u_15070902/3751101,作者:炒香菇的书呆子,版权归原作者所有。本网站转在其作品的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如因作品内容、版权等问题需要同本网站联系,请发邮件至ctyunbbs@chinatelecom.cn沟通。
上一篇:Ubuntu 安装Qt
下一篇:VMware中ubuntu忘记密码的解决办法(转)