{"id":1662,"date":"2021-12-16T12:22:43","date_gmt":"2021-12-16T09:22:43","guid":{"rendered":"https:\/\/files2.tojikon.net\/files-cloud\/2021\/03\/22\/how-to-install-qt-5-on-ubuntu\/https:\/\/files2.tojikon.net\/files-cloud\/2021\/03\/22\/how-to-install-qt-5-on-ubuntu\/"},"modified":"2021-12-16T12:22:43","modified_gmt":"2021-12-16T09:22:43","slug":"how-to-install-qt-5-on-ubuntu","status":"publish","type":"post","link":"https:\/\/tojikon.net\/en\/1662-how-to-install-qt-5-on-ubuntu\/","title":{"rendered":"How to install qt 5 on Ubuntu"},"content":{"rendered":"<section id=\"related_posts\">\n<div class=\"block-head\">\n<h3>Related Articles<\/h3>\n<\/div>\n<\/section>\n<p>Are you an Ubuntu Linux user and developer that needs Qt 5 installed on your system? Can\u2019t figure out what packages to install to use it? We can help! Follow along with this guide as we go over how to install Qt 5 on Linux!<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-397673 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu.png\" alt=\"install qt 5 on Ubuntu\" width=\"1200\" height=\"613\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu.png 1200w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-5.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-6.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-9.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<h2>Install Qt 5 on Ubuntu via official software repositories \u2013 terminal<\/h2>\n<p>If you\u2019re using Ubuntu, the best way to get Qt 5 up and running on your system is through the official Ubuntu software repositories. To start the installation process, you must open up a terminal window.\u00a0<\/p>\n<p>To open up a terminal window on the Ubuntu Linux desktop, press\u00a0<strong>Ctrl + Alt + T\u00a0<\/strong>on the keyboard. Alternatively, search for \u201cTerminal\u201d in the app menu and open it up that way.<\/p>\n<p>Once the terminal window is open on the Ubuntu desktop, the installation can begin. Using the\u00a0<strong>apt install\u00a0<\/strong>command, set up the \u201cqt5-default\u201d package on your computer.\u00a0<\/p>\n<pre>\nsudo apt install qt5-default\n<\/pre>\n<p>After typing in the\u00a0<strong>apt install\u00a0<\/strong>command above, Ubuntu will ask you for your password. The reason it is asking for your password is that <strong>sudo\u00a0<\/strong>requires a password. Type in your user password and press the <strong>Enter<\/strong> key. Do not worry if you do not see any password feedback.<\/p>\n<p>If your password was entered successfully, the terminal should accept it and attempt to collect all dependencies required for the\u00a0\u201cqt5-default\u201d package on your system. Once all dependencies are collected, press the\u00a0<strong>Y\u00a0<\/strong>button to continue with the installation.\u00a0<\/p>\n<p>The installation of Qt 5 using the official Ubuntu software sources should be quick, as only a handful of things need to be downloaded and installed on your system. For more information on Qt 5, check out the official documentation.<\/p>\n<h2>Install Qt 5 on Ubuntu via official software repositories \u2013 GUI<\/h2>\n<p>If you\u2019d prefer to set up Qt 5 on your Ubuntu PC using the GUI, the best way to go is with the Synaptic Package Manager. It\u2019s an excellent application that gives Ubuntu users the ability to search and install packages without touching the terminal.<\/p>\n<p>Sadly, Synaptic doesn\u2019t come pre-installed on Ubuntu systems anymore. To get it working, open up Ubuntu Software, search for \u201cSynaptic,\u201d and install it. Once you\u2019ve got it working, open it via the app menu.<\/p>\n<p>With Synaptic Package Manager open, look for the \u201cSearch\u201d button in the top-right section of the app, and click on it with the mouse. Then, click on the text box next to \u201cSearch\u201d and type out \u201cqt5-default\u201d.<\/p>\n<p>After typing out your search term, find the \u201csearch\u201d button inside of the pop-up window and click it to perform a search of the Ubuntu software repositories. The search should not take long.<\/p>\n<p>Look through the search results for \u201cqt5-default,\u201d and right-click on it with the mouse. Inside the right-click menu, look for the option \u201cMark for installation\u201d and select it.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-397673 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu.png\" alt=\"\" width=\"1200\" height=\"613\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu.png 1200w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-5.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-6.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-9.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<p>Now that the \u201cqt5-default\u201d package is marked for installation in Synaptic Package Manager locate the \u201cApply\u201d button and select it with the mouse. When you click \u201cApply,\u201d Synaptic will attempt to download and install Qt 5 on your Ubuntu PC.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-397674 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-1.png\" alt=\"\" width=\"1200\" height=\"570\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-1.png 1200w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-11.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-13.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-14.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<p>The installation shouldn\u2019t take too long. When the process is complete, close Synaptic Package Manager as it is no longer necessary. For more information on Qt 5 for Linux, check the documentation.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-397675 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-3.png\" alt=\"\" width=\"1359\" height=\"633\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-3.png 1359w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-15.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-17.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-install-qt-5-on-ubuntu-19.png 768w\" sizes=\"(max-width: 1359px) 100vw, 1359px\"\/><\/p>\n<h2>Install Qt 5 on Ubuntu via the Qt website<\/h2>\n<p>While it is highly recommended to install Qt 5 on Ubuntu using Ubuntu\u2019s official packages, it is also possible to download Qt 5 from the website and install it that way.<\/p>\n<p>To start the installation of Qt 5 via the official website, open up a terminal window. You can open up a terminal window on the Ubuntu desktop with\u00a0<strong>Ctrl + Alt + T<\/strong> or search for \u201cTerminal\u201d in the app menu.<\/p>\n<p>Once the terminal window is open, make use of the\u00a0<strong>wget\u00a0<\/strong>command to download the latest Qt 5 from the website.<\/p>\n<pre>\nwget https:\/\/download.qt.io\/official_releases\/qt\/5.12\/5.12.10\/qt-opensource-linux-x64-5.12.10.run\n<\/pre>\n<p>After downloading Qt 5, you must update the permissions of the file so that it can be executed as a program.<\/p>\n<pre>\nsudo chmod +x qt-opensource-linux-x64-5.12.10.run\n<\/pre>\n<p>Execute the Qt 5 run file to start the installation.\u00a0<\/p>\n<pre>\n.\/qt-opensource-linux-x64-5.12.10.run\n<\/pre>\n<p>Following the installation of the Qt 5 run file, you must install various dependencies. These dependencies are required for Qt 5 to run correctly on Ubuntu.\u00a0<\/p>\n<pre>\nsudo apt install libfontconfig1 build-essential mesa-common-dev libglu1-mesa-dev\n<\/pre>\n<p>After installing all of these dependencies, you will need to create a desktop entry for Ubuntu. To do this, enter the commands below.<\/p>\n<pre>\ntouch ~\/.local\/share\/applications\/Qt-Creator.desktop\necho \"[Desktop Entry] Version=1.0 Encoding=UTF-8 Type=Application Name=QtCreator Comment=QtCreator NoDsiplay=true Exec=(Install folder of QT)\/Tools\/QtCreator\/bin\/qtcreator %f Icon=(Install folder of QT)\/5.4\/Src\/qtdoc\/doc\/images\/landing\/icon_QtCreator_78x78px.png Name[en_US]=Qt-Creator\" &gt; ~\/.local\/share\/applicationsQt-Creator.desktop\n<\/pre>\n<p>Update the permissions of the Qt Creator file with\u00a0<strong>chmod<\/strong>.<\/p>\n<pre>\nsudo chmod +x ~\/.local\/share\/applicationsQt-Creator.desktop\n<\/pre>\n<p>Make Qt the default file association for pro files on Ubuntu using\u00a0<strong>echo<\/strong>.<\/p>\n<pre>\necho \"text\/qtcreator=Qt-Creator.desktop;\" &gt;&gt; ~\/.local\/share\/applications\/defaults.list\n<\/pre>\n<p>After adding the file association, everything should work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Related Articles Are you an Ubuntu Linux user and developer that needs Qt 5 installed on your system? Can\u2019t figure out what packages to install to use it? We can help! Follow along with this guide as we go over how to install Qt 5 on Linux! Install Qt 5 on Ubuntu via official software &hellip;<\/p>\n","protected":false},"author":1,"featured_media":1663,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21],"tags":[33],"_links":{"self":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1662"}],"collection":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/comments?post=1662"}],"version-history":[{"count":0,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1662\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media\/1663"}],"wp:attachment":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media?parent=1662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/categories?post=1662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/tags?post=1662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}