找回密码
 立即注册
  • QQ空间
  • 回复
  • 收藏

Qt部署工具

admin 2019-12-15 17:54 541人围观 Qt相关

## 开启执行权限

$ chmod u+x ./linuxdeployqt-6-x86_64.AppImage

$ chmod u+x ./linuxdeployqt-continuous-x86_64.AppImage

## 把qmake加入PATH环境变量

$ export PATH=/opt/Qt4.8.7/bin:$PATH

## 开始打包

$ ./linuxdeployqt-continuous-x86_64.AppImage ./HelloWorld -appimage

## 配置patchelf

$ tar -xzvf patchelf-0.10.tar.gz

$ ./configure --prefix=/opt/patchelf-0.10

$ make

$ sudo mkdir /opt/patchelf-0.10

$ sudo chown -R zta:zta/opt/patchelf-0.10

$ make install

$ ./linuxdeployqt-6-x86_64.AppImage /opt/patchelf-0.10/bin/patchelf

提示如下:

linuxdeployqt 5 (commit 37631e5), build 631 built on 2019-01-25 22:47:58 UTC

FHS-like mode with PREFIX, fhsPrefix: "/opt/patchelf-0.10"

app-binary: "/opt/patchelf-0.10/bin/patchelf"

appDirPath: "/opt"

relativeBinPath: "patchelf-0.10/bin/patchelf"

Keeping existing AppRun

ERROR: ldd outputLine: "libjvm.so => not found"

ERROR: for binary: "/opt/Android/android-studio/jre/jre/lib/amd64/libjawt.so"

ERROR: Please ensure that all libraries can be found by ldd. Aborting.

解决方案:

$ find /opt/Android/ -name libjvm.so

/opt/Android/android-studio/jre/jre/lib/amd64/server/libjvm.so

$ vi /etc/ld.so.conf

新增一行:/opt/Android/android-studio/jre/jre/lib/amd64/server

立即生效

$ sudo /sbin/ldconfig

/opt/Android/android-studio/jre/jre/lib/amd64

/opt/Android/android-studio/bin/lldb/lib

/opt/Android/android-sdk/emulator/lib64

/opt/Android/android-sdk/platform-tools/lib64

/opt/Android/android-sdk/emulator/lib64/qt/lib




----------------------------------------------------------------------------------------------------------------------
我们尊重原创,也注重分享,文章来源于微信公众号:程序员创业啦,建议关注公众号查看原文。如若侵权请联系qter@qter.org。
----------------------------------------------------------------------------------------------------------------------

鲜花

握手

雷人

路过

鸡蛋

yafeilinux和他的朋友们微信公众号二维码

微信公众号

专注于Qt嵌入式Linux开发等。扫一扫立即关注。

Qt开源社区官方QQ群二维码

QQ交流群

欢迎加入QQ群大家庭,一起讨论学习!

我有话说......