The Patchelf tool can modify the dependent library location of the compiled run program and specify the library linker
Patchelf--set-rpath
Patchelf--set-interpreter
With this tool HTTPS://GITHUB.COM/PROBONOPD/LINUXDEPLOYQT if you do not compile, you can also download the ready-made
Https://github.com/probonopd/linuxdeployqt/releases
Run./linuxdeployqt-2-x86_64.appimage shanbaydict and for success, the generated Lib directory has very few so files.
Run./linuxdeployqt-2-x86_64.appimage Shanbaydict-appimage was unsuccessful, but Lib generated many so files
After modifying rpath with Patchelf--set-rpath/opt/qt-5.7-static/lib/:./lib shanbaydict, Shanbaydict can run independently and copy to the newly installed Ubuntu together with Lib 16.04 system, can also be run.
LDD Shanbaydict shows that Rpath has pointed to the./lib Directory
Patchelf can be installed via sudo apt install patchelf
February 24, 2017
QT 5.8 compiled QT program
Set the environment variables to confirm that Qmake-v is the QT version that you use, and if not, the solution is:
Export Path=/home/lieefu/qt5.8.0/5.8/gcc_64/bin: $PATH
Create the QML directory, the/HOME/LIEEFU/QT5.8.0/5.8/GCC_64/QML directory to use the module copied over, my app used three QtQuick, Qtquick.2, Qtmultimedia.
Add plugin platforminputcontexts include libfcitxplatforminputcontextplugin.so file, you can use Sogou Input method to enter Chinese characters
./linuxdeployqt-continuous-x86_64.appimage Lilydict-appimage
This command runs on both sides of the line, to solve this bug https://github.com/probonopd/linuxdeployqt/issues/64
The libqxcb.so rpath hadn ' t been set correctly.
Running patchelf--set-rpath ' $ORIGIN/. /.. /lib ' plugins/platforms/libqxcb.so
Re-set the XCB library again with the second run Rpath
March 2, 2017, the latest version of Linuxdeployqt-continuous-x86_64.appimage, does not need to run both sides of the
https://my.oschina.net/lieefu/blog/756712
QT Program release Linux version, software packaging Knowledge (patchelf tools to modify the dependent library, confirm that Qmake-v is the QT version of its own use, otherwise modified with export path) good