2

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

0

2 Answers 2

0

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
10
  • 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.andalous
    Jun 3, 2017 at 15:20
  • How to make it consider QT5.4.2 version. Thanks
    – B.andalous
    Jun 3, 2017 at 15:27
  • what was the output of whereis qmake ?
    – Ravexina
    Jun 3, 2017 at 15:31
  • 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
    – B.andalous
    Jun 3, 2017 at 16:56
  • 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.
    – Ravexina
    Jun 3, 2017 at 16:57
0

Look in /opt/qt54/bin for a file called qt54-env.sh. If the file is not there open Files file browser at /opt/qt54/ and search for qt54-env.sh from there. Source /opt/qt54/lib/qt54-env.sh to set the correct environment.

cd  
source /opt/qt54/lib/qt54-env.sh
2
  • i tried to run the command you gave but it shows this error: update-alternatives: error: no alternatives for qmake
    – B.andalous
    Jun 3, 2017 at 15:05
  • 1
    I think it is installed here Qt version 5.4.2 in /opt/qt54/lib but how to make it as a default
    – B.andalous
    Jun 3, 2017 at 16:59

Not the answer you're looking for? Browse other questions tagged .