解决CentOS遇到Qt编译(error: cannot find -lGL)

简介: 笔者CentOS 6.5 64位,安装完成Qt5.5.1。随意新建一个Qt Widgets Application。 结果遇到Qt编译问题,提示信息如下: error: cannot find -lGL error: collect2: error: ld returned 1 exit status 原因是系统缺乏相应的OpenGL库文件造成,解决方案如下: 进入CentOS系统的终端,依次执行以下命令,即可解决。

笔者CentOS 6.5 64位,安装完成Qt5.5.1。随意新建一个Qt Widgets Application。 结果遇到Qt编译问题,提示信息如下: error: cannot find -lGL error: collect2: error: ld returned 1 exit status 原因是系统缺乏相应的OpenGL库文件造成,解决方案如下: 进入CentOS系统的终端,依次执行以下命令,即可解决。 su root yum install mesa-libGL-devel mesa-libGLU-devel yum install freeglut-devel

目录
相关文章
|
缓存 Linux 数据库
CentOS 8中 更新或下载时报错:为仓库 ‘appstream‘ 下载元数据失败 : Cannot prepare internal
通过以上步骤,您可以有效地解决 CentOS 8 中“为仓库 ‘appstream’ 下载元数据失败 : Cannot prepare internal”问题。关键在于检查网络连接、更新和切换仓库配置、清理缓存、重建 RPM 数据库以及在必要时临时禁用有问题的仓库。通过这些方法,可以确保系统能够正常进行软件包的更新和下载操作。
4323 20
|
Windows
qt Error 20报错
这篇文章讨论了Qt开发中遇到的Error 20报错问题,并提供了将Windows服务中的NahimicService设置为手动运行或关闭的解决方案。
436 0
qt Error 20报错
|
编译器 Windows
plugin cannot be loaded for module “QtQuick“ && Could not load the Qt platform plugin “windows“
本文讨论了在Qt应用程序中遇到的平台插件加载问题,包括具体的错误信息、解决方案和参考链接。问题表现为无法加载“QtQuick”模块的插件,并且无法找到“windows”平台插件。解决方案是修改环境变量`Qt5_DIR`以使用正确的Qt版本和编译器环境。
1485 2
|
网络协议 Linux 虚拟化
CentOS 8 错误: Error setting up base repository
CentOS 8 错误: Error setting up base repository
1048 2
Centos8 Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist:
Centos8 Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist:
957 1
qt中编译错误:error: C2001: 常量中有换行符的解决办法
qt中编译错误:error: C2001: 常量中有换行符的解决办法
|
C++ Windows
vs2019 This application failed to start because it could not find or load the QT platform plugin
这篇文章介绍了在VS2019中解决QT程序运行时出现的“无法找到或加载QT平台插件”错误的步骤,通过将必要的DLL文件和插件目录复制到项目解决方案中解决了问题。
|
Linux
Centos7.4升级7.9失败,救援:/boot目录下文件丢失error: file ‘/initramfs-3.10.0-957.el7.x86_64.img‘ not found
以上步骤应该可以帮助你解决问题。如果问题仍然存在,可能需要更深入的排查。
828 1
Qtdesigner报错:This application failed to stat could not find or load the Qt platform plugin “windows“
Qtdesigner报错:This application failed to stat could not find or load the Qt platform plugin “windows“
centos6.0下Error:Connectionactivationfailed:DevicenotmanagedbyNetworkManager解决办法
centos6.0下Error:Connectionactivationfailed:DevicenotmanagedbyNetworkManager解决办法
525 0