问题描述
我已经正确安装Qt Creator在我的Debian虚拟机,但我得到错误,当尝试编译默认Qt项目:找不到-lGL 。我在Google上搜索解决方案,但我发现的每个解决方案都没有帮助我,即使问题几乎相同。我想要有人解释我发生了什么,为什么无法找到这个库?
I have correctly installed Qt Creator on my Debian virtual machine, but I'm getting error when trying to compile default Qt project: cannot find -lGL. I searched for solution on Google, but every solution I found didn't helped me, even if the problems were almost the same. I would like someone to explain me what's happening, why that library cannot be found?
我安装了libglu1-mesa-dev软件包,但是没有解决问题。我花了几天在我的机器上配置Qt,但是我真的不知道如何解决这个库问题吗?
I installed libglu1-mesa-dev package, but that didn't solved the problem. I spent few days to configure Qt on my machine, but really I have no idea how to solve this library problem?
这没有解决我的问题。
ldconfig -p |的输出grep GL命令是:
Output of ldconfig -p | grep GL command is:
libGLU.so.1 (libc6) => /usr/lib/i386-linux-gnu/libGLU.so.1
libGLEW.so.1.7 (libc6) => /usr/lib/i386-linux-gnu/libGLEW.so.1.7
libGL.so.1 (libc6, OS ABI: Linux 2.4.20) => /usr/lib/i386-linux-gnu/libGL.so.1
推荐答案
我找到了我的问题的解决方案,所以我会与大家分享。
I found the solution for my problem, so I'll share it with all of you.
如我所述,我有一个问题,尝试在Debian Qt Creator交叉编译器上编译默认项目。
As I described in question, I had a problem when trying to compile default project on Debian Qt Creator cross-compiler.
我缺少两个库 libglu1-mesa-dev 和 libgl1 -mesa-dev
我试图通过获取它们apt-get install libglu1-mesa-dev libgl1-mesa-dev ,但我不断收到错误 W:无法抓取.. ,我成功地解决了这个问题,执行以下三个步骤:
I tried to get them via sudo apt-get install libglu1-mesa-dev libgl1-mesa-dev, but I kept receiving errors W:Failed to fetch.. and I succeeded to solve this problem doing these three steps:
- sudo bash -c'echonameserver 127.0.0.1>> /etc/resolv.conf'
- sudo apt-get update
- sudo apt-get install libglu1-mesa-dev libgl1-mesa-dev
我希望这可以帮助没有任何类型的库不只是这两个!
I hope this helps to everyone who lacks any type of library not just these two!
这篇关于Qt Creator编译器问题在Debian的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!