0

I am trying to deploy a Qt5 application with a Marble plugin using dynamic linking. I have put the Qt5 libs, platform plugins and the marble libmarblewidget-qt5.so.22 with my executable application. The application works from an Ubuntu with marble installed on it. Now I am trying to run the application on an Ubuntu without marble installed. I am using the startup script from http://doc.qt.io/qt-5/linux-deployment.html to start my application. I am working on Ubuntu 16.04 32-bits.

When I run the startup script for the application (from terminal) I get this error message:

Map theme file does not exist: ""
Ignoring to load the following file since it doesn't look like a valid Marble plugin: "/boot/initrd.img-4.4.0-21-generic" 
Reason: "'/boot/initrd.img-4.4.0-21-generic' is not an ELF object"
Ignoring to load the following file since it doesn't look like a valid Marble plugin: "/boot/vmlinuz-4.4.0-21-generic" 
Reason: "'/boot/vmlinuz-4.4.0-21-generic' is not an ELF object"
Segmentation fault (core dumped)

Am I missing something, should I have something more than just the libmarblewidget-qt5.so.22?

4

1 回答 1

0

大理石需要的不仅仅是libmarblewidget-qt5.so正常运行。至少您需要您想要显示的地图主题的数据,通常还需要一些插件。CMAKE_INSTALL_PREFIX编译 Marble 后查看安装文件夹 ( )。您会在 eg 中找到插件,lib64/marble/share/marble/data.

插件和数据的路径被编译成libmarblewidget-qt5.so,但可以在运行时更改。为此,请使用MarbleDirs::setMarbleDataPath()MarbleDirs::setMarblePluginPath()

简而言之,你必须

  • 将所有或部分插件发送到您选择的文件夹
  • 称呼MarbleDirs::setMarblePluginPath("/your/plugins/install/folder");
  • 将全部或部分数据发送到您选择的另一个文件夹
  • 称呼MarbleDirs::setMarbleDataPath("/your/data/install/folder");

您得到的输出(也可能是段错误)的发生是因为目标系统上不存在编译的插件路径,因此 Marble 的插件管理器搜索/并尝试加载它在那里找到的文件。

于 2016-07-22T17:49:12.173 回答