Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to move Qt5 installation directory [LINUX]
Alketi last edited by
Our Linux deployment essentially requires moving the Qt5 installation directory.
There appear to be two issues: binary files, and library files.
Cobbling together information across the Internet, I've added a "qt.conf" file to the install/bin directory, with the new directory location. This fixes the binary files pointing to the wrong installation. "qmake -query" now points to the new location. Good.
Running "ldd" on any of the libraries in /lib results in "not found" errors for libraries that reside together in the same directory. Similar problems for libraries in /plugins/platforms.
Is there a way to build Qt so it uses relative paths instead of hard coded paths for it's own libraries??
andreyc last edited by
On Linux you can use LD_LIBRARY_PATH environment variable to point to the libraries location.
hskoglund last edited by
Hi, you can export LD_LIBRARY_PATH as andreyc says. Or, if you want to use relative paths, you can use the chrpath utility to change the rpaths of your .so file and main executable file so that they can find each other when they're in the same directory. (I've written about it "here":http://www.tripleboot.org/?p=138 scroll down to Linux GCC section)