centos 下Qt 编译错误 skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
免费下载资源
·
编译报错
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libGL.so when searching for -lGL
/usr/bin/ld: skipping incompatible /lib/libGL.so when searching for -lGL
/usr/bin/ld: skipping incompatible /usr/lib/libGL.so when searching for -lGL
/usr/bin/ld: cannot find -lGL
解决办法
一、首先确保GL库已安装
// 输入如下命令进行安装
sudo yum install freeglut
sudo yum install freeglut-devel
二、查看libGL详细信息
locate libGL.so | egrep ^/usr | xargs file
目前发现的信息会有两种
/usr/lib/libGL.so: symbolic link to `libGL.so.1.2.0'
/usr/lib/libGL.so.1: symbolic link to `libGL.so.1.2.0'
/usr/lib/libGL.so.1.2.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=9c9d874bcd64c89f0baea60a7878bd5d10942844, stripped
/usr/lib64/libGL.so: broken symbolic link to `libGL.so.1.2.0' // 此处 broken
/usr/lib64/libGL.so.1: symbolic link to `libGL.so.1.2.0'
/usr/lib64/libGL.so.1.2.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=ff6de922c57fb9e18e0e2d429dd7f395c42672c1, stripped
或
/usr/lib/libGL.so: symbolic link to `libGL.so.1.2.0'
/usr/lib/libGL.so.1: symbolic link to `libGL.so.1.2.0'
/usr/lib/libGL.so.1.2.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=9c9d874bcd64c89f0baea60a7878bd5d10942844, stripped
/usr/lib64/libGL.so.1: symbolic link to `libGL.so.1.2.0'
/usr/lib64/libGL.so.1.2.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=ff6de922c57fb9e18e0e2d429dd7f395c42672c1, stripped
–相对于第一处, 缺少/usr/lib64/libGL.so–
三、软链接
// 输入如下命令
sudo ln -s /usr/lib64/libGL.so.1 /usr/lib/gcc/x86_64-redhat-linux/4.8.5/libGL.so
继续编译,则没有错误了。
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
已为社区贡献1条内容
所有评论(0)