我在Debian的Qt中建立应用程式时遇到问题。
当我尝试编译任何内容时,我得到:
/ usr / ld:找不到-lGL collect2:错误:ld返回1退出状态 make:*** [测试]错误1 14:38:52:Proces/ usr / bin /
最后一行表示: Procces(...)退出代码: 2
有什么想法吗?
<因为这是一个链接器错误,您可能有两个问题之一:- 您没有安装libGL
- 安装了libGL,但不在您的系统路径中。
如果未安装libGL,您可以安装:
sudo apt-get install libgl1-mesa-dev
我认为是正确的包。我没有一个debian机器方便,所以我不能测试它。
如果您已安装此软件包,则需要将其添加到系统路径。您需要将它附加到环境变量 LD_LIBRARY_PATH ,或者使文件位于 .conf > /etc/ld.so.conf.d / 。
再次,我没有一个debian机器来验证这些路径,但这是我可以从内存做的最好的。无论哪种方式,这应该是足够的信息开始。
祝你好运!
I have a problem building applications in Qt on Debian.
When I try to compile anything I get:
/usr/bin/ld: cannot find -lGL collect2: error: ld returned 1 exit status make: *** [test] Error 1 14:38:52: Proces "/usr/bin/make" zakończył się kodem wyjściowym 2.
Last line means: Procces(...) exited with code: 2
Any idea what's wrong?
解决方案Since this is a linker error, you may have one of two problems:
- You don't have libGL installed
- libGL is installed but not in your system path.
If libGL isn't installed, you can install it:
sudo apt-get install libgl1-mesa-dev
I think is the right package. I don't have a debian machine handy so I can't test it.
If you have this package installed, you need to add it to your system path. You'll need to append it to environment variable LD_LIBRARY_PATH or make a .conf file located in /etc/ld.so.conf.d/.
Again, I don't have a debian machine to verify these paths, but that's the best I can do from memory. Either way, this should be enough information to get started.
Good luck!
更多推荐
Qt debian / ubuntu:无法编译,错误:找不到
发布评论