Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve a symbol look up error on Qt installation on Ubuntu

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

How can I solve this?

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

like image 422
jackho Avatar asked Jan 27 '23 08:01

jackho


1 Answers

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.

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.

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.

like image 158
ygramoel Avatar answered Jan 28 '23 21:01

ygramoel