ImportError: /lib/aarch64-linux-gnu/libwayland-server.so.0: undefined symbol: ffi_type_uint32...

Recently, I was tossing the board of Rockchip RK3588. After installing the ubuntu system, I was going to install pyqt. After cross-compiling according to the online tutorial, I could import it in the terminal, but there was a problem in this step:

from PyQt5.QtWidgets import *

The error message is as follows: 

ImportError: /lib/aarch64-linux-gnu/libwayland-server.so.0: undefined symbol: ffi_type_uint32, version LIBFFI_BASE_7.0

Undefined symbols appear, which may be a problem with the environment variables of the dynamic library. Get the solution after consulting the information:

export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libffi.so.7

The reason is that libffi.so.7 has not been added to the environment variable, and Pyqt5 can run normally after using the above command.

Guess you like

Origin blog.csdn.net/m0_57315535/article/details/128113311