/usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.7' not found (required by emulator64-x86)

蓝咒 提交于 2019-12-10 23:16:10

问题


I've compile the android source source ./build/envsetup.sh lunch aosp_x86_64-eng

when I run emulator64-x86 in terminal, error occur:

emulator64-x86: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.7' not found (required by emulator64-x86)

emulator64-x86: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5' not found (required by emulator64-x86)

emulator64-x86: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: version `Qt_5' not found (required by emulator64-x86)

emulator64-x86: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: version `Qt_5' not found (required by emulator64-x86)

I've found qt in

/home/wanyu/work/aosp/prebuilts/android-emulator/linux-x86_64/lib64/qt/

this directory include libQt5Core.so.5.7, libQt5Widgets.so.5.7 etc.

but libQt5Core.so in

/usr/lib/x86_64-linux-gnu/

version is 5.5

I've tried to set LD_LIBRARY_PATH to:

/home/wanyu/work/aosp/prebuilts/android-emulator/linux-x86_64/lib64/

but the error still occur.

Copying the libQt5Core.so.5 to

/usr/lib/x86_64-linux-gnu/

will solve this error, but qt platform plugin libqxcb won't work.

How I can change the lib path to the

/home/wanyu/work/aosp/prebuilts/android-emulator/linux-x86_64/lib64

when I run emulator64-x86?


回答1:


Leave libQt5Core.so.5 in /home/wanyu/work/aosp/prebuilts/android-emulator/linux-x86_64/lib64/qt/. Qt does not like to be moved around, it makes it lose where the plugins are stored. In your case it might end up trying to load Qt 5.5 plugins.

Set LD_LIBRARY_PATH to /home/wanyu/work/aosp/prebuilts/android-emulator/linux-x86_64/lib64/qt/.

Use ldd to check which library will be used when running.

Also note that qxcb requires X11 to run.




回答2:


For me what works was copying all android internal qt libs to system qt libs folder cp -a $ANDROID_HOME/emulator/lib64/qt/lib/. /usr/lib/x86_64-linux-gnu/



来源:https://stackoverflow.com/questions/42189670/usr-lib-x86-64-linux-gnu-libqt5core-so-5-version-qt-5-7-not-found-required

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!