How to make sure that Qt5.4.2 is installed properly

6,076

You might have both versions installed, use whereis command to find about all available instance of a program:

whereis command-name

e.g:

whereis qmake

it will tell you if any other version was available, then you can use absolute path to find about its version, like:

/usr/local/bin/qmake -v
Share:
6,076

Related videos on Youtube

B.rayane
Author by

B.rayane

Updated on September 18, 2022

Comments

  • B.rayane
    B.rayane over 1 year

    I installed qt5.4 from here in Ubuntu 14.04, but when I run:

    qmake -v
    

    I always get the old version Qt5.2.1, although I think it is installed here Qt version 5.4.2 in /opt/qt54/lib. Can anyone tell me how to make sure that Qt5.4.2 is installed properly?

    Thanks

  • B.rayane
    B.rayane almost 7 years
    i tried to run the command you gave but it shows this error: update-alternatives: error: no alternatives for qmake
  • B.rayane
    B.rayane almost 7 years
    yeah i can see it now in: QMake version 3.0 Using Qt version 5.4.2 in /opt/qt54/lib but he is taken into consideration the previous one: Project MESSAGE: Qt version 5.2.1 Project ERROR: Unknown module(s) in QT: quickwidgets
  • B.rayane
    B.rayane almost 7 years
    How to make it consider QT5.4.2 version. Thanks
  • Ravexina
    Ravexina almost 7 years
    what was the output of whereis qmake ?
  • B.rayane
    B.rayane almost 7 years
    here it is the output : qmake: /usr/bin/qmake /usr/bin/X11/qmake /opt/qt54/bin/qmake Qt5.4.2 is in /opt/qt54/bin/qmake . kindly tell me how to make it as a default
  • Ravexina
    Ravexina almost 7 years
    So it's installed in /opt my suggestion is to create an alias: alias qmake="/opt/qt54/bin/qmake" you can add this line at the end of ~/.bashrc so it will be available in all your terminals.
  • B.rayane
    B.rayane almost 7 years
    I think it is installed here Qt version 5.4.2 in /opt/qt54/lib but how to make it as a default
  • B.rayane
    B.rayane almost 7 years
    I did it but still when i do qmake -v the Qt5.2.1 appears. Any other suggestions please
  • Ravexina
    Ravexina almost 7 years
    what is the output of /opt/qt54/bin/qmake -v ?
  • B.rayane
    B.rayane almost 7 years
    here it is the output Using Qt version 5.4.2 in /opt/qt54/lib but when i compile to install ardupilot it uses Qt5.2.1 how can i change it to Qt5.4.2
  • Ravexina
    Ravexina almost 7 years
    I'm not sure about that, you can do something like this (Not a good Idea): sudo mv /usr/bin/qmake /usr/bin/qmake-bk then sudo ln -s /opt/qt54/bin/qmake /usr/bin/qmake
  • B.rayane
    B.rayane almost 7 years
    Well guys, I could make Qt5.4.2 as a default by just editing default.conf in /usr/lib/x86_64-linux-gnu/qtchooser .I just added the path of Qt5.4.2. Thanks