![linux下安装QT5:error: unrecognized command line option ‘-fuse-ld=gold’ linux下安装QT5:error: unrecognized command line option ‘-fuse-ld=gold’](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
安装qt时在执行./configure时报错:error: unrecognized command line option ‘-fuse-ld=gold’
这个错误是qt的一个bug。
在装有gold linker的系统里,编译脚本会加入-fuse-ld=gold选项,但这个选项gcc是不支持的。
解决办法是移除该选项,找到文件src/3rdparty/webkit/Source/common.pri,屏蔽QMAKE_LFLAGS+=-fuse-ld=gold。
将# QMAKE_LFLAGS+=-fuse-ld=gold注释掉即可。
参考文章: