I'm trying to install QtiPlot on Mac OS X, but I can't compile it since qmake isn't known. How can I install qmake on Mac OS X?
6 Answers
Homebrew version
$ brew install qt
-
7
-
2If you get
Error: Qt currently requires --HEAD on Mavericks
, runbrew install qt --HEAD
(requiresgit
). Jan 28, 2014 at 3:37 -
5While
qmake
does exist in the Homebrew package, it doesn't appear to be symlinked by default anymore. Trybrew link qt
Or if that doesn't work:ln -s /usr/local/Cellar/qt/<QT_VERSION_HERE>/bin/qmake /usr/local/bin/qmake
Dec 5, 2017 at 20:47 -
1If you need specific version of
qt
, for example4.8.7_2
: usebrew switch qt 4.8.7_2
. Make sure you add it toPATH
:export PATH="/usr/local/opt/qt/bin:$PATH"
Dec 5, 2017 at 20:53 -
3@TrinitronX's suggestion is good to use
brew link qt
, but I had to use--force
. Here's the whole command:brew link qt --force
. To verify it worked, then runwhich qmake
to print out the path to qmake. Nov 6, 2019 at 16:29
Just to elaborate for anyone who finds that after installing qt5, can't access qmake in the terminal.
Install QT5 using:
brew install qt5
Then to allow access qmake from the terminal you'll need to run:
brew link qt5 --force
Just got it!
Install MacPorts: http://www.macports.org/
On Terminal:
sudo port install qt4-mac
Then, I got qmake. You can install qtiplot directly by running: sudo port install qtiplot
. Process takes about 3h.
-
3It appears that either updating the path, or manually symlinking
qmake
is now needed: stackoverflow.com/a/31318672/1959808– 0 _Nov 11, 2015 at 23:10 -
1e.g. /usr/bin/sudo ln -s /opt/local/libexec/qt5/bin/qmake /opt/local/bin/qmake Oct 18, 2020 at 18:10
The official Qt installer, including qmake, is available from nokia at http://qt.nokia.com/downloads, but BE CAREFUL:
The so-called "SDK" download, which appears near the top of the page is not what you want. Maddeningly, qmake and other needed tools are available from the "Qt Libraries" download. Scroll down the page and find "Qt libraries". This gets me confused every time I install Qt on the Mac.
QMake
is part of Qt
since 3.0, earlier versions had tMake
.
So, either look for tMake
instead or install/upgrade your Qt
to get QMake
, good luck!
-
I don't have Qt installed. I just want to install QtiPlot, but their documentation isn't intuitive. Mar 11, 2011 at 12:46
-
You will need the
Qt-devel
andQt-config
and their dependencies in order to haveQMake
Mar 11, 2011 at 12:48 -
-
2@FábioPerez: No, QtiPlot is written with the intent that QMake generates the Makefiles. Mar 11, 2011 at 13:03
For installing Qt5 with brew, you can do
brew install qt5
-
2Isn't this essentially the same as the accepted answer (wouldn't anyone doing the installation recognize a name change and understand to use the actual name of what they want to install)? Nov 16, 2014 at 5:27
-
1This gave me qt5 but not qmake. I only get qmake with
brew install qt
, but then it is the old version of qmake :( Sep 2, 2016 at 10:55 -
-
Can't work out whether it's a synonym in Homebrew, but it does the same thing as
brew install qt
. Today's homebrew recipe doesn't symlink qtmake sadly.– paul_hDec 30, 2017 at 12:15 -
This absolutely includes
qmake
. See elMarquis's answer.– user59659Sep 21, 2018 at 18:25