Ubuntu Qmake is not an executable
If it may be useful:
To have the developer versions of Qt4 and Qt5 at the same time, and to develop using one or the other:
First I downloaded the Qt 5.4.1 offline installer from http://www.qt.io/download-open-source/, I executed it and it was installed in its default folder (in $HOME/Qt5.4.1
).
To achieve that the system used that Qt 5 version as the default to develop with Qt (and so that it could find the correct qmake
, etc.), I executed:
newQtchooserFolder="$HOME/.config/qtchooser"
mkdir -p "$newQtchooserFolder"
newQt5Configuration="$newQtchooserFolder/5.conf"
echo "$HOME/Qt5.4.1/5.4/gcc_64/bin" > "$newQt5Configuration"
echo "$HOME/Qt5.4.1/5.4/gcc_64/lib" >> "$newQt5Configuration"
sudo ln -sfv "$newQt5Configuration" /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf
And if Qt 4 was needed to develop:
a) Temporarily: qmake -qt4
(or qmake -qt=4
) could be executed instead of just qmake
; or export QT_SELECT=4
could be executed and then qmake
.
b) Permanently: The link /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf
could point to another .conf
file like /usr/share/qtchooser/qt4-x86_64-linux-gnu.conf
.
There's more information about those steps in man qtchooser
and in http://www.linuxfromscratch.org/blfs/view/7.4/general/qtchooser.html.
Related videos on Youtube
![DolDurma](https://i.stack.imgur.com/P9zfD.jpg?s=256&g=1)
DolDurma
مهدی پیشگوی هستم. برنامه نویس و توسعه دهنده اپلیکیشن های سمت سرور و اندروید
Updated on September 18, 2022Comments
-
DolDurma almost 2 years
I have the latest versions of
qtcreator
,qt5-qmake
build-essential
andg++
installed.In option of
Build & Run
and choose qmake in/usr/bin/qmake
I get this error:The qmake executable /usr/lib/i386-linux-gnu/qt4/bin/qmake could not be added: qmake '/usr/lib/i386-linux-gnu/qt4/bin/qmake' is not an executable.
In Home system I don't have any problem after installing those packages and setting Qmake in option
Other information:
tux-world@alachiq:~ > apt-cache search qt5-qmake qt5-qmake - Qt 5 qmake Makefile generator tool tux-world@alachiq:~ > ldd /opt/qtForArm/bin/qmake ldd: /opt/qtForArm/bin/qmake: No such file or directory tux-world@alachiq:~ > sudo chmod +x /usr/lib/i386-linux-gnu/qt4/bin/qmake [sudo] password for tux-world: chmod: cannot access ‘/usr/lib/i386-linux-gnu/qt4/bin/qmake’: No such file or directory
-
kenn almost 10 yearswhat is the output of
ls -l /usr/lib/i386-linux-gnu/qt4/bin/qmake
? -
DolDurma almost 10 years@kenn
ls: cannot access /usr/lib/i386-linux-gnu/qt4/bin/qmake: No such file or directory
-
kenn almost 10 yearsyou installed qt5, why are you trying to execute qt4?
-
kenn almost 10 yearscheck out my old answer here askubuntu.com/questions/424161/…
-