如何解决在Ubuntu上安装Qt时出现的符号查找错误 [英] How to solve a symbol look up error on Qt installation on Ubuntu

查看:136
本文介绍了如何解决在Ubuntu上安装Qt时出现的符号查找错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Ubuntu上完成了Qt的安装,但是当我要启动Qt Creator时,会出现如下错误:

I completed the installation of Qt on Ubuntu,but when I want to launch the Qt Creator, an error comes up as follows:

/home/jackho/anaconda3/bin/python: symbol lookup error: /home/jackho/anaconda3/lib/python3.6/site-packages/PyQt5/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5: undefined symbol: FT_Get_Font_Format

我该如何解决?

我已经多次重新安装了Qt和PyQt5,但是没有用.

I have reinstalled the Qt and PyQt5 many times but it didn't work.

推荐答案

问题在于,freetype库在2015年某个地方将FT_Get_X11_Font_Format重命名为FT_Get_Font_Format.请参见

The problem is that the freetype library renamed FT_Get_X11_Font_Format to FT_Get_Font_Format somewhere in 2015. See https://github.com/juj/emscripten-freetype/commit/f4d1c11faa116daad655b50828a434babbdaed2a The old symbol FT_Get_X11_Font_Format is still defined in the new version of the library for backward compatibility, but the new symbol is of course not defined in the old library (such as the version that is part of Debian 8.11 Jessie). A newer QtCreator will attempt to call the new symbol (through PyQt5) but will not find it.

对于QtCreator,此处提到了一种变通方法: https://bugreports.qt.io /browse/QTBUG-74375 我实际上没有尝试过,因为我没有运行QtCreator,而是运行了另一个基于PyQt5的应用程序.

For QtCreator, a work-around is mentioned here: https://bugreports.qt.io/browse/QTBUG-74375 I did not actually try it because I am not running QtCreator, but another application based on PyQt5.

更基本的解决方案是安装较新版本的freetype库.可以从Github上的 https://github.com/juj/emscripten-freetype下载freetype库的源代码. .编译并安装最新版本可以为我解决问题.

A more fundamental solution is to install a newer version of the freetype library. Source code for the freetype library can be downloaded from Github at https://github.com/juj/emscripten-freetype. Compiling and installing the latest version solved the problem for me.

这篇关于如何解决在Ubuntu上安装Qt时出现的符号查找错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆