https://wiki.qt.io/index.php?title=How_to_setup_Qt5_for_Ubuntu_using_Virtual_Box&feed=atom&action=historyHow to setup Qt5 for Ubuntu using Virtual Box - Revision history2024-03-29T12:58:57ZRevision history for this page on the wikiMediaWiki 1.39.4https://wiki.qt.io/index.php?title=How_to_setup_Qt5_for_Ubuntu_using_Virtual_Box&diff=23149&oldid=prevWieland: Marked as outdated2016-03-24T14:26:36Z<p>Marked as outdated</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 14:26, 24 March 2016</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{<del style="font-weight: bold; text-decoration: none;">Cleanup </del>| reason=<del style="font-weight: bold; text-decoration: none;">Auto-imported from ExpressionEngine.</del>}}</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{<ins style="font-weight: bold; text-decoration: none;">Outdated</ins>|reason=<ins style="font-weight: bold; text-decoration: none;">Old versions of Qt, Ubuntu and Virtual Box</ins>}}</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:HowTo]]</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:HowTo]]</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Tutorial]]</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Tutorial]]</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">= How to setup Qt5 for Ubuntu using Virtual Box =</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Introduction ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Introduction ==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<!-- diff cache key heroku_app_db:diff::1.12:old-23147:rev-23149 -->
</table>Wielandhttps://wiki.qt.io/index.php?title=How_to_setup_Qt5_for_Ubuntu_using_Virtual_Box&diff=23147&oldid=prevWieland: Wieland moved page Setting-up-Qt-on-Ubuntu-in-VirtualBox to How to setup Qt5 for Ubuntu using Virtual Box: Better title2016-03-24T14:25:22Z<p>Wieland moved page <a href="/Setting-up-Qt-on-Ubuntu-in-VirtualBox" class="mw-redirect" title="Setting-up-Qt-on-Ubuntu-in-VirtualBox">Setting-up-Qt-on-Ubuntu-in-VirtualBox</a> to <a href="/How_to_setup_Qt5_for_Ubuntu_using_Virtual_Box" title="How to setup Qt5 for Ubuntu using Virtual Box">How to setup Qt5 for Ubuntu using Virtual Box</a>: Better title</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 14:25, 24 March 2016</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>Wielandhttps://wiki.qt.io/index.php?title=How_to_setup_Qt5_for_Ubuntu_using_Virtual_Box&diff=16105&oldid=prevAutoSpider: Remove non-functioning "toc" command2015-04-17T12:36:35Z<p>Remove non-functioning "toc" command</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 12:36, 17 April 2015</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l4">Line 4:</td>
<td colspan="2" class="diff-lineno">Line 4:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Tutorial]]</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Tutorial]]</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">[toc align_right="yes" depth="2"]</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>= How to setup Qt5 for Ubuntu using Virtual Box =</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>= How to setup Qt5 for Ubuntu using Virtual Box =</div></td></tr>
<!-- diff cache key heroku_app_db:diff::1.12:old-10643:rev-16105 -->
</table>AutoSpiderhttps://wiki.qt.io/index.php?title=How_to_setup_Qt5_for_Ubuntu_using_Virtual_Box&diff=10643&oldid=prevAutoSpider: Add "cleanup" tag2015-03-03T16:58:55Z<p>Add "cleanup" tag</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 16:58, 3 March 2015</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{Cleanup | reason=Auto-imported from ExpressionEngine.}}</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:HowTo]]</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:HowTo]]</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Tutorial]]</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Tutorial]]</div></td></tr>
</table>AutoSpiderhttps://wiki.qt.io/index.php?title=How_to_setup_Qt5_for_Ubuntu_using_Virtual_Box&diff=6617&oldid=prevMaintenance script at 09:27, 25 February 20152015-02-25T09:27:34Z<p></p>
<a href="//wiki.qt.io/index.php?title=How_to_setup_Qt5_for_Ubuntu_using_Virtual_Box&diff=6617&oldid=4076">Show changes</a>Maintenance scripthttps://wiki.qt.io/index.php?title=How_to_setup_Qt5_for_Ubuntu_using_Virtual_Box&diff=4076&oldid=prevMaintenance script at 08:57, 24 February 20152015-02-24T08:57:55Z<p></p>
<a href="//wiki.qt.io/index.php?title=How_to_setup_Qt5_for_Ubuntu_using_Virtual_Box&diff=4076&oldid=2074">Show changes</a>Maintenance scripthttps://wiki.qt.io/index.php?title=How_to_setup_Qt5_for_Ubuntu_using_Virtual_Box&diff=2074&oldid=prevMaintenance script at 17:44, 14 January 20152015-01-14T17:44:13Z<p></p>
<p><b>New page</b></p><div>=How to setup Qt5 for Ubuntu using Virtual Box=<br />
<br />
==Introduction==<br />
<br />
Having struggled for a few days getting the correct sequence of events to occur to allow me to run Qt on a Ubuntu virtual machine on my window PC I feel I should share what I have found incase others want to do the same.<br />
<br />
'''Why would you want to even do that?''' – well, in my case, I can now run my Qt project on Windows and Linux very easily and very quickly test it works for both. This provides quicker multi-platform testing. You can also test multiple versions of Ubuntu (or windows) and with different compiler versions as well, you just add more virtual machines.<br />
<br />
Finally to be able to work / sync to the same code-base you can install/use '''rabbitVCS on Ubuntu''' so that it works in the same way as tortoise <span class="caps">SVN</span> in windows, and then all of your virtual machines are “talking” to the same <span class="caps">SVN</span> repo… nice <span class="smiley">:)</span><br />
<br />
==Versions==<br />
<br />
These are the versions that I have used / tested this all with<br />'''Windows:''' XP SP3 (as my host operating system)<br />'''Ubuntu:''' 10.04, 12.04 and 12.10<br />'''VirtualBox:''' v4.2.12<br />
<br />
==1. Setting Up VirtualBox with Ubuntu==<br />
<br />
In the purpose of this wiki I will use the example of Ubuntu 12.04 and make notes where other versions may differ.<br />
<br />
Install and setup a virtual machine for Ubuntu:<br />
<br />
* Download and install VirtualBox latest version<br />
* Run virtual box and cklick “new”<br />
* Enter name and ensure “version” is Ubuntu. Go through the screens and select the following options:<br />
* at least 512MB (more if you can, allow about 1/4 of your memory).<br />
* Create virtual <span class="caps">HDD</span><br />
* <span class="caps">VDI</span><br />
* Dynamic or Fixed (I chose fixed because I heard there can be issues with running out of disk space with dynamic, but I am sure dynamic is probably ok!)<br />
* Allow at Enough space, the default is ok (8GB)…<br />
<br />
Now your Virtual Machine is created. Do the following to install Ubuntu:<br />
<br />
* Download Linux .iso image from http://releases.ubuntu.com/precise/ (I put it on a <span class="caps">USB</span> stick)<br />
* Double click your fresh virtual machine called &lt;name&gt; (whatever you called it)<br />
* It will ask you to select a Startup disk. Click the browse button and select your .iso image. Now your ubuntu will boot from this image<br />
* Ubuntu will run, you will have two options: “Use Ubuntu” or “Install”, click install and follow the installation process, I just used all the defaults (except for username, passwords, etc…).<br />
* Once this is completed you will reboot Ubuntu. If your virtual machine does not automatically restart, close it (shutdown) and re-start it in VirtualBox.<br />
* At this point your Ubuntu may boot and tell you that you are in “low graphics mode”. Don’t panic, just press ctrl+alt+f1 (left ctrl button) to go to the command line and continue with the following steps, otherwise you are done for this part <span class="smiley">:)</span><br />
* Login by entering your user name followed by your password.<br />
* Once you are logged in enter: “sudo apt-get update”<br />
* For “sudo” it will ask you for your password again, enter it.<br />
* Enter “sudo apt-get upgrade” to perform the upgrades.<br />
* Now enter “sudo reboot” to reboot, this should sort it.<br />
<br />
Once you are in to ubuntu, you may want to install further updates from the update manager… or go into a terminal and run the previous 4 steps (except for the reboot part <span class="smiley">:o</span> )<br />
<br />
Now to make your Virtual Ubuntu experience even better (otherwise you are limited to a tiny window and have no copy/paste buffer or other shared resources, etc…<br />
<br />
* You need to install Guest Additions in your Virtual Machine. For Ubuntu there is a handy “install guest addtions” under the devices menu when you are running Ubuntu. Click this.<br />
* This copies some files to: /media/VBOXADDITIONS….<br />
* cd to this location<br />
* now run the linux additions: “./VBoxLinuxAdditions.run”<br />
* Once this is finished, restart your VMachine.<br />
<br />
==2. Installing Qt 5.0.2 on Ubuntu==<br />
<br />
'''Note:''' For the latest <span class="caps">GNU</span> compiler its probably worth getting the latest Ubuntu release (i.e. &gt;= 12.10 for gcc/g++ 4.7 or higher for the c++11 features) rather then trying to upgrade the compiler and all the links/libraries yourself! I recommend Ubuntu 12.10 for the moment which give gnu 4.7.2, but this is all your choice…<br />
<br />
* download the latest (or whichever version you want) Qt sdk from qt.io/download (5.0.2 was used at the time of writing)<br />
* cd to the download directory and enter the following commands:<br />
* sudo chmod +x qt-linux-opensource-5.0.2-x86-offline.run (where this is the file you downloaded, this makes it eXecutable)<br />
* sudo ./qt-linux-opensource-5.0.2-x86-offline.run (to run it)<br />
* Follow the install instructions.<br />
<br />
Now you have Qt 5.0.2, with Qt creator and all the tools to run and build your project. But since I documented RabbitVCS I may as well add that next…<br />
<br />
==3. RabbitVCS (a TortoiseSVN substitute for Ubuntu)==<br />
<br />
* Enter the following in a terminal (enter password for first “sudo” command<br />
* sudo add-apt-repository ppa:rabbitvcs/ppa<br />
* sudo apt-get update<br />
* For Ubuntu &gt;= 11.10: “sudo apt-get install rabbitvcs-thunar rabbitvcs-gedit rabbitvcs-cli rabbitvcs-nautilus3”<br />
* For Ubuntu &lt; 11.10: “sudo apt-get install rabbitvcs-thunar rabbitvcs-gedit rabbitvcs-cli rabbitvcs-nautilus”<br />
* Now log out of Ubuntu and log back in for changes to take effect.<br />
<br />
'''Note:''' To use, right click in any folder and do <span class="caps">SVN</span> —&gt; Checkout…. the rest is pretty much the same as tortoiseSVN <span class="smiley">:)</span><br /> Or, you can use the command line <span class="smiley">:(</span><br />
<br />
==4. Trouble Shooting==<br />
<br />
This is a list of issues that I faced and how they where resolved, I will add to this list if I find more…<br />
<br />
===Ubuntu 12.04 has experienced an internal error with /usr/bin/Xorg===<br />
<br />
Re-start lightdm to clear the problem:<br />
<br />
* sudo service lightdm stop<br />
* sudo dpkg-reconfigure xorg xserver-xorg xserver-xorg-core<br />
* sudo service lightdm start<br />
<br />
===“/usr/bin/ld: cannot find -lgcc_s” when building your Qt project===<br />
<br />
In some later versions of Ubuntu some files seem to have moved or been renamed and we need to make a sym link to fix this (well, this is the easiest way to do it). Do this with the following line in a terminal:<br />
<br />
* sudo ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so<br />
<br />
==5. Final Note==<br />
<br />
Feel free to comment, add-to or correct this page <span class="smiley">:)</span> … or even just laugh and say “look at this idiot there” <span class="smiley">:o</span><br />
<br />
==6. Related Articles==<br />
<br />
* [[Install Qt 5 on Ubuntu]] ''[qt.io]''<br />
<br />
===Categories:===<br />
<br />
* [[:Category:HowTo|HowTo]]<br />
* [[:Category:Tutorial|Tutorial]]</div>Maintenance script