{"id":10459,"date":"2020-07-09T14:05:04","date_gmt":"2020-07-09T14:05:04","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=10459"},"modified":"2022-05-11T07:57:51","modified_gmt":"2022-05-11T07:57:51","slug":"install-qt4-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2020\/07\/install-qt4-ubuntu-20-04\/","title":{"rendered":"How to Install Qt4 Libraries in Ubuntu 20.04 [Ubuntu 22.04 Updated]"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt-logo.webp\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt-logo-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" class=\"alignleft size-thumbnail wp-image-39672\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt-logo-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt-logo-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt-logo-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt-logo-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt-logo.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>The Qt4 framework has been removed from Ubuntu 20.04 main repository. It is however still required for some obsolete applications.<\/p>\n<p>Though it is not recommended, you can still get Qt4 libraries (e.g., <code>libqt4-declarative<\/code>, <code>qt4-dev-tools<\/code>, <code>qt4-qmake<\/code>, <code>libqtwebkit4<\/code>, and more) as software dependencies or for building an application via this <a href=\"https:\/\/launchpad.net\/~rock-core\/+archive\/ubuntu\/qt4\/\" rel=\"noopener\" target=\"_blank\">third-party PPA<\/a>.<\/p>\n<p><b>NOTE: Qt4 has reached end of life! You may run into security issues with the library. USE IT AT YOUR OWN RISK! And for Ubuntu 22.04 LTS, please scroll down for option 2.<\/b><\/p>\n<h3>Option 1: Install Qt4 in Ubuntu 20.04<\/h3>\n<p><b>1.)<\/b> Open terminal either by pressing <b>Ctrl+Alt+T<\/b> on keyboard or by searching for &#8216;terminal&#8217; from your system application launcher. When terminal opens, run command:<\/p>\n<pre style=\"border:none;\">sudo add-apt-repository ppa:rock-core\/qt4<\/pre>\n<p><i>Type user password (no asterisk feedback) when it prompts and hit enter.<\/i><\/p>\n<div class=\"arconix-box arconix-box-yellow\"><i class='fa fa-2x pull-left fa-lightbulb-o'><\/i><div class=\"arconix-box-content\">For <b>Ubuntu 20.10<\/b> users sticking to Qt4 libraries, try well trusted <a href=\"https:\/\/launchpad.net\/~gezakovacs\/+archive\/ubuntu\/ppa\" target=\"_blank\" rel=\"noopener\">UNetbootin PPA<\/a>.<\/p>\n<p>The PPA built Qt4 package as dependency libraries since Unetbootin was based on Qt4.<\/p>\n<pre style=\"border:none\">sudo add-apt-repository ppa:gezakovacs\/ppa<\/pre>\n<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt4-unofficial-ppa-600x110.jpg\" alt=\"\" width=\"600\" height=\"110\" class=\"aligncenter size-large wp-image-10461\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt4-unofficial-ppa-600x110.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt4-unofficial-ppa-450x83.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt4-unofficial-ppa.jpg 701w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><b>2.)<\/b> After adding the PPA, it should automatically refresh the system package cache. On some Ubuntu derivatives, you may run command to manually update the package cache:<\/p>\n<pre style=\"border:none;\">sudo apt update<\/pre>\n<p><b>3.)<\/b> Finally install the software <code>.deb<\/code> package, and it should automatically install the required Qt4 libraries after running <i>sudo apt -f install<\/i>.<\/p>\n<p>Or you may install specified Qt4 package by running command:<\/p>\n<pre style=\"border:none;\">sudo apt install PACKAGE_NAME<\/pre>\n<p>See <a href=\"https:\/\/launchpad.net\/~rock-core\/+archive\/ubuntu\/qt4\/+packages\" rel=\"noopener\" target=\"_blank\">here<\/a> for a full list of available Qt4 libraries.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/apt-qt4.png\" alt=\"\" width=\"450\" height=\"269\" class=\"aligncenter size-full wp-image-10462\" \/><\/p>\n<h3>Option 2: Install Qt4 in Ubuntu 22.04<\/h3>\n<p>For the new Ubuntu 22.04 LTS, you can get the Qt4 libraries via this <a href=\"https:\/\/launchpad.net\/~ubuntuhandbook1\/+archive\/ubuntu\/ppa\" rel=\"noopener\" target=\"_blank\">unofficial PPA<\/a>. The packages there belongs to <a href=\"https:\/\/launchpad.net\/~kelebek333\" rel=\"noopener\" target=\"_blank\">kelebek333<\/a>.<\/p>\n<p><b>1<\/b>. Firstly, press <b>Ctrl+Alt+T<\/b> on keyboard to open terminal. When it opens, run the command below to add the PPA:<\/p>\n<pre>sudo add-apt-repository ppa:ubuntuhandbook1\/ppa<\/pre>\n<p><i>Type user password when it asks (no asterisk feedback) and hit Enter to continue.<\/i><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt4-ppa-jammy-600x407.webp\" alt=\"\" width=\"600\" height=\"407\" class=\"aligncenter size-large wp-image-39668\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt4-ppa-jammy-600x407.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt4-ppa-jammy-300x203.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt4-ppa-jammy-768x521.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt4-ppa-jammy.webp 786w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><b>2.<\/b> After adding the PPA, install your old app packages should automatically install Qt4 as dependencies. <\/p>\n<p>To install the packages manually, either run command <code>sudo apt install PACKNAME<\/code> in terminal or use Synaptic package manager:<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt4-packages.webp\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt4-packages-600x449.webp\" alt=\"\" width=\"600\" height=\"449\" class=\"aligncenter size-large wp-image-39669\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt4-packages-600x449.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt4-packages-300x224.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt4-packages-768x574.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt4-packages.webp 869w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h4>Uninstall Qt4:<\/h4>\n<p>To remove the PPA, run command:<\/p>\n<pre style=\"border:none;\">sudo add-apt-repository --remove ppa:rock-core\/qt4<\/pre>\n<p>Or remove the PPA for Ubuntu 22.04 using command:<\/p>\n<pre>sudo add-apt-repository --remove ppa:ubuntuhandbook1\/ppa<\/pre>\n<p>To remove all Qt4 libraries, run command:<\/p>\n<pre style=\"border:none;\">sudo apt remove --autoremove libqt4* libqtcore4 libqtgui4 libqtwebkit4 qt4*<\/pre>","protected":false},"excerpt":{"rendered":"<p>The Qt4 framework has been removed from Ubuntu 20.04 main repository. It is however still required for some obsolete applications. Though it is not recommended, you can still get Qt4 libraries (e.g., libqt4-declarative, qt4-dev-tools, qt4-qmake, libqtwebkit4, and more) as software dependencies or for building an application via this third-party PPA. NOTE: Qt4 has reached end [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":39672,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[1948],"class_list":["post-10459","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-install-qt4-ubuntu-20-04"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/10459","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=10459"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/10459\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/39672"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=10459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=10459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=10459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}