Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. After Qt installation, an application cannot find Qt, and qmake also not working
Forum Updated to NodeBB v4.3 + New Features

After Qt installation, an application cannot find Qt, and qmake also not working

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 3.4k Views 2 Watching
  • 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.
  • K Offline
    K Offline
    klausb
    wrote on 16 Dec 2016, 23:42 last edited by
    #1

    Hello,
    I installed Qt5.6.1 on Ubuntu 16.04 LTS and the development environment starts but that's not what I need.

    With the installer, it was installed in my home directory under /Qt5.6.1

    1:
    I have a program compiled on another Ubuntu 14.04 LTS system which is not working on the new installation.
    The error is:
    ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5: version Qt_5' not found (required by ./xflr5) ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: version Qt_5' not found (required by ./xflr5)
    ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version Qt_5.6' not found (required by ./xflr5) ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version Qt_5' not found (required by ./xflr5)
    ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: version `Qt_5' not found (required by ./xflr5)

    2:
    I also tried to compile a new version on the new system using qmake, that's also not working.

    I assume there need to be some PATH setting in .bashrc and .profile which were required on the old system but this didn't help:
    .bashrc
    PATH=/home/klaus/Qt5.6.1/5.6/gcc_64/bin

    .profile
    PATH=/home/klaus/Qt5.6.1/5.6/gcc_64/bin:$PATH
    export PATH

    What settings are requires to compile a program using qmake?

    Klaus

    A 1 Reply Last reply 17 Dec 2016, 02:02
    0
    • K klausb
      16 Dec 2016, 23:42

      Hello,
      I installed Qt5.6.1 on Ubuntu 16.04 LTS and the development environment starts but that's not what I need.

      With the installer, it was installed in my home directory under /Qt5.6.1

      1:
      I have a program compiled on another Ubuntu 14.04 LTS system which is not working on the new installation.
      The error is:
      ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5: version Qt_5' not found (required by ./xflr5) ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: version Qt_5' not found (required by ./xflr5)
      ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version Qt_5.6' not found (required by ./xflr5) ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version Qt_5' not found (required by ./xflr5)
      ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: version `Qt_5' not found (required by ./xflr5)

      2:
      I also tried to compile a new version on the new system using qmake, that's also not working.

      I assume there need to be some PATH setting in .bashrc and .profile which were required on the old system but this didn't help:
      .bashrc
      PATH=/home/klaus/Qt5.6.1/5.6/gcc_64/bin

      .profile
      PATH=/home/klaus/Qt5.6.1/5.6/gcc_64/bin:$PATH
      export PATH

      What settings are requires to compile a program using qmake?

      Klaus

      A Offline
      A Offline
      ambershark
      wrote on 17 Dec 2016, 02:02 last edited by
      #2

      @klausb I do this in my .bashrc:

      PATH="/usr/local/Qt/bin:$PATH"
      QTDIR="/usr/local/Qt"
      export PATH QTDIR
      

      That should get you what you need to use your Qt. Make sure you adjust to your paths. Your QTDIR will be all the way to the directory that has bin, lib, etc.

      If all else fails you can start your apps with an LD_LIBRARY_PATH which will cause them to use your specific Qt version instead of the system one.

      I.e.

      LD_LIBRARY_PATH="/your/path/to/Qt/lib" ./yourapp
      

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 17 Dec 2016, 23:12 last edited by
        #3

        HI and welcome to devnet,

        If you'd like to build/run your application on the command line, you should rather use the full path to the version of qmake you want to use. That way you know precisely which one you'll be calling.

        Modifying the PATH environment like that has a side effect: if you are using also your distribution's dev package for development it won't be the default anymore.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        A 1 Reply Last reply 18 Dec 2016, 01:27
        0
        • S SGaist
          17 Dec 2016, 23:12

          HI and welcome to devnet,

          If you'd like to build/run your application on the command line, you should rather use the full path to the version of qmake you want to use. That way you know precisely which one you'll be calling.

          Modifying the PATH environment like that has a side effect: if you are using also your distribution's dev package for development it won't be the default anymore.

          A Offline
          A Offline
          ambershark
          wrote on 18 Dec 2016, 01:27 last edited by
          #4

          @SGaist That is true. I usually prefer just my custom built Qt to develop with though. I rarely use the one that is installed with Linux.

          On occasion I have a project that needs an older Qt, in which case I tend to use aliases to switch. I tend to have things like alias set-qt54="..." which I can call to change my QTDIR and PATH to the Qt I want. I would find it much more annoying to constantly have to do something like /usr/local/Qt/bin/qmake every time I wanted to run it. Although I use almost exclusively cmake now so it probably wouldn't bother me anymore. :)

          My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

          1 Reply Last reply
          0

          1/4

          16 Dec 2016, 23:42

          • Login

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