Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to move Qt5 installation directory [LINUX]
QtWS25 Last Chance

How to move Qt5 installation directory [LINUX]

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 3 Posters 4.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alketi
    wrote on last edited by
    #1

    Our Linux deployment essentially requires moving the Qt5 installation directory.

    There appear to be two issues: binary files, and library files.

    BINARY 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.

    LIBRARY FILES
    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??

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      On Linux you can use LD_LIBRARY_PATH environment variable to point to the libraries location.
      @
      export LD_LIBRARY_PATH=/Path/toQt/lib:$LD_LIBRARY_PATH
      ldd /Path/toQt/lib/libQt5Widgets.so
      @

      1 Reply Last reply
      0
      • hskoglundH Offline
        hskoglundH Offline
        hskoglund
        wrote on last edited by
        #3

        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)

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved