Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How To Install Qt 5.0.x in Linux Mint
tested to work with Qt 5.0.2 and Mint 15
I had gone through a heap load of trouble getting this to work to let's get started:
First download Qt 5.0.1 from http://qt-project.org/downloads I'm using a 32bit machine so I'll select that and download the file qt-linux-opensource-5.0.1-x86-offline.run. To install the .run file, right click for terminal in the directory containing the installer and type:
@chmod u+x qt-linux-opensource-5.0.1-x86-offline.run
Let it install with all default settings(update: In Mint 15 with Qt 5.0.2, it's default installation directory is /home/username/Qt5.0.2. It's weird to put it there so I'd recommend changing it to /opt/Qt5.0.2)
Now if you just try to run Qt Creator now you'll realize you can't open the application(update: this seems to be fixed with Qt 5.0.2... or Mint 15). That's because there seems to be some faulty linking problem thing going on. To fix this, you'll create your own custom launcher.
Right click your desktop and select "Create Launcher...".
- Type = Location
- Name = Qt Creator
- Location = opt/Qt5.0.1/Tools/QtCreator/bin/qtcreator
now if you navigate to the qt5 directory and type "png" you will be able to find the Qt Creator logo. Just drag and drop it to that red rocket, press "ok" and you have your launcher set up.
Now, you should be able to run Qt creator but unable to build and run anything. That's because lots of dependencies are missing. You would think that by installing Qt 5.0.1 they would install the dependencies as well but they don't. Now open up the terminal and copy paste this:
@sudo apt-get install build-essential
sudo apt-get install libx11-xcb-dev libglu1-mesa-dev libxrender-dev@
Now when you open Qt Creator it complains up to 3 times some .xml file and no permission access denied thing and complains 3 times(exact same things) when it closes. Strange problem. So navigate to your home folder, reveal hidden files(Ctrl-H) and navigate to /.config/QtProject
Open a terminal there and type
@sudo chown -R username qtcreator@
And so, there you have it. Qt 5.0.1 and Qt Creator 2.6.2 running happily.
Now if you do use the examples(opt/Qt5.0.1/5.0.1/gcc/examples), you'll realized that you do not have permission to access it. Why? I don't know. But to change it go to "opt/Qt5.0.1/5.0.1/gcc" right click and open terminal and type
@sudo chown -R username examples@
Where "username" is the name of the user you wish to transfer full permissions to.
special thanks to sierdzio for making the process a whole lot simpler.
Qt uses a bin installer... why would you suspect it installs dependencies automatically?
Check out instructions "here":http://qt-project.org/wiki/Building_Qt_5_from_Git, they would have saved you a lot of trouble.
would have been nice if it did handled the dependencies...
I just looked at the link briefly. I went there before it's just I thought it meant building Qt 5.0.1 from source... haha
So I'm guessing if I type
@sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev@
It will install the dependencies I need?
Indeed it does. Adding build-essential package is a nice plus, too (it contains the compiler, among other things).
This should probably be more broadly communicated.
Yes it should... -.-"
Most novices would have assumed downloading and opening the linux installer would have got everything working.
I'll ping people at web ML, that should help.
ok. Thanks! I've updated my post based on your suggestion.
Web ML is pinged + I've created a wiki article about Qt5 dependencies. "Link":http://qt-project.org/wiki/Qt5_dependencies.
Cool. I just checked your wiki out. Not sure how novices would get to it though... unless someone put the link up on the downloads page.
So I'm thinking the alternate method for my tutorial is not going to work cause I'm missing the line
@sudo apt-get install build-essential@
which installs the g++ compiler that I need?
That is why I have informed more powerful people about it, hopefully a link on Downloads page will be posted or they will think of some better way to solve this.
Yes, on Debian friends build-essential package includes all the basic goodies needed for compiling stuff. You can install GCC separately if you prefer. Or, in fact, you can also use clang.
sierdzio, I've updated your dependencies wiki with some novice friendly information. Someone before me seemed to have heavily removed a lot of the stuff you wrote. You might wanna have a look at that.
Yeah, that's done by Qt devs, because not all packages are required when using prebuilt Qt. Especially *xcb-dev stuff is not required.
Hi. It's been awhile since my post but with Mint 15 out I updated with Qt 5.0.2. What I realize was that libx11-xcb and libglu1-mesa was installed by default. Thing is, it doesn't suffice for Qt 5 applications to compile. They compiler complains some GL/ bla bla header cannot be found. So I updated here and the wiki:
sudo apt-get install build-essential
sudo apt-get install libx11-xcb-dev libglu1-mesa-dev libxrender-dev
I'm not quite sure whether libxrender-dev or libx11-xcb-dev is really needed cause I tried installing it first and it didn't work. Only after libglu1-mesa-dev is installed did Qt 5 start working properly. "^libxcb.*" is confirmed not required.
anyhow, updated the 1st post to match my findings
joew last edited by
Hi bruceoutdoors and flocks,
I am new to Linux (few days) and I want install the JACK and ALSA plus the Qt. Because I need to do the music composing and production. I have search for so many hours/days and cannot find the way that is easy for the beginers. Thanks for bruceoutdoors has this guidence and I am able to install the QT.
However, ladies and gentlemen, anyone can help me/ tell me the clear instruction to downloan and install JACK and ALSA in Linux Mint 15. There are so many package in the website. I don't know which package that I really need. And please give me clear instruction to install, like bruckoutdoors did.
I'm glad that to see my article has been of use to someone (:
However, I'm afraid the issue regarding ALSA and JACK is out of the context of this forum. Personally I don't use them though... everything audio related is handled by audacity, and I don't do any MIDI composing.
darkoverlordofdata last edited by
Thanks, this post post got me up and running on linux mint 15.
To me, this issue doesn't present as a missing dependency, but as a bug.
The application said it could not find gcc, which was already installed. Now I can see that it was actually looking for g++. Even now on the Options->Build Compiler tab, it says it found gcc, but if you look at the path, it found g++.
The questions is - what is the bug? Should it really use gcc rather than g++? Or are the screen labels and error messages wrong?
uh... are you compiling stuffs in Qt now? Are you running Qt 5.1? I haven't really used Qt for time, so...
It uses g++ btw. I never once seen Qt Creator looking for gcc before...
darkoverlordofdata last edited by
Yep - I can build and run the examples using 5.1.1
It may just be my inexperience with gnu - In the past I used borland and ms compilers. But on the options->build->compiler tab, the screen specifies gcc, and yet the auto entry is for g++. In retrospect, it didn't cause the issue, but it did cause me some confusion - I take software tools very literally :)
The matter is rather simple: GCC nowadays stands for GNU Compiler Collection. In that it encompasses a C compiler (called gcc), a C++ compiler (called g++) and a few others (fortran, etc.).
Names change over time, but in general, if people say GCC but talk about C++, they mean g++ ;)
norrbotten68 last edited by
Thank you very VERY MUCH for your explanation. I spent 2 days to find whats wrong with my Linux (or Qt). I can't even count how many documents I found that just make thinks worse. Thank!!!