ubuntu Qt linuxdeployqt打包
1.下载PatchELF 0.9.,https://nixos.org/patchelf.html
安装:./configure
make
sudo make install
2.终端命令设置设置环境变量PATH qmake -v
export PATH=/home/likewei/Qt5.11.2/5.11.2/gcc_64/bin:$PATH #自己Qt安装的位置
export LD_LIBRARY_PATH=/home/likewei/Qt5.11.2/5.11.2/gcc_64/lib:$LD_LIBRARY_PATH
export QT_PLUGIN_PATH=/home/likewei/Qt5.11.2/5.11.2/gcc_64/plugins:$QT_PLUGIN_PATH
export QML2_IMPORT_PATH=/home/likewei/Qt5.11.2/5.11.2/gcc_64/qml:$QML2_IMPORT_PATH
3.下载linuxdeployqt zip格式的源码包linuxdeployqt-master.zip,https://github.com/probonopd/linuxdeployqt
用Qt打开选择release模式进行编译。编译弹出终端就代表编译成功。
打开编译好的文件夹进入bin文件找到这个文件linuxdeployqt,如/home/likewei/lib/build-linuxdeployqt-Desktop_Qt_5_11_2_GCC_64bit-Release/bin
并将linuxdeployqt移动到/usr/local/bin文件夹下。
sudo mv /home/likewei/software/build-linuxdeployqt-Desktop_Qt_5_11_2_GCC_64bit-Release/bin/linuxdeployqt /usr/local/bin