How to Install KDevelop on Ubuntu 22.10/22.04/20.04

ComputingPost
5 min readDec 26, 2022

--

KDevelop is a free and open-source integrated development environment (IDE) that provides editing, navigation, and debugging features for several programming languages. In the following tutorial, you will learn how to install KDevelop on Ubuntu 22.10 Kinetic Kuduo, Ubuntu 22.04 Jammy Jellyfish, or Ubuntu 20.04 Focal Fossa Linux with APT, Snap, or Flatpak method using the command line terminal and instructions on how to update and remove the software in the future if required.

What is KDevelop? What does it do?

KDevelop is an open-source integrated development environment (IDE) specifically designed for writing applications using C, C++, Python, and QML. It emphasizes usability, code quality, and support for multiple programming languages while making it easy to concentrate on the actual software development process. KDevelop allows developers to navigate their code easily, refactor it smoothly and track down bugs as quickly as possible. A robust build environment provides plenty of options for testing and debugging new code in different configurations. With the help of KDevelop, developers can get the most out of their projects in shorter amounts of time, especially when working with object-oriented languages like C++ or coding sophisticated graphical user interfaces with QML.

Note about the Tutorial

The following tutorial was done with a Ubuntu 22.10 release, and example images were taken. Still, it was tested on Ubuntu 20.04 and Ubuntu 22.04. In the future, if Ubuntu makes any changes to break the tutorial for one of the distribution versions, please place a comment for me to investigate so I can update the tutorial.

Recommended Steps Before Installation

Before you begin, run an update on your system to ensure all packages are up-to-date to avoid any conflicts during the installation.

sudo apt update

Optionally, you can list the updates for users who require review or are curious.

sudo apt --list upgradable

Proceed to upgrade any outdated packages using the following command.

sudo apt upgrade

Method 1: Install KDevelop — APT Default Repository

The first and easiest method to install Kdevelop is to use the APT package manager. This provides the most stable and secure way for your system. However, it may lag behind newer versions with updated features, performance, and bug fixes, such as those found in Flatpak or Snapcraft methods.

sudo apt install kdevelop -y

Method 2: Install KDevelop — Snapcraft Method

The second option is to install KDevelop as a snap. The Snapcraft package manager should be installed on your Ubuntu desktop unless you have removed it. It is often the easiest solution to install packages quickly on Ubuntu systems other than using APT.

For users that removed snapd, re-run the following command to re-install snapd.

sudo apt install snapd -y

Once installed, you will need to restart your system, or else the icons may not appear; if you skip a repeat and notice any issues, reboot.

reboot

Snap installed? Skip the following few lines and proceed straight to the installation with Snap

Next, some packages come in classic, so you need to create a symlink to enable classic snap support; so it is best to run this command for the best snap compatibility.

sudo ln -s /var/lib/snapd/snap /snap

Install the core files to avoid conflicting issues.

sudo snap install core

Next, enter the following snap command to install.

sudo snap install kdevelop --classic

Method 3: Install KDevelop — Flatpak with Flathub Repo

The third option is to use the Flatpak package manager. Flatpak is not installed natively on Ubuntu distributions by default, and while Snapcraft is alive and running, it never will be, as Canonical is behind both Ubuntu and Snaps. Still, it is available to install if you so wish.

First, install the Flatpak manager if it was removed previously.

sudo apt install flatpak -y

For users installing Flatpak for the first time, it is often recommended to reboot your system. Failure to do this can occur in odd issues, such as wrong icon paths.

sudo reboot

SKIP THE REBOOT IF FLATPAK IS INSTALLED.

Next, you need to enable Flatpack using the following command in your terminal.

sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Next, you can install the KDevelop Flatpak with the following command.

flatpak install flathub org.kde.kdevelop -y

Once installed, you can proceed to launch.

Troubleshoot Flatpak KDevelop Installation

First, the most common error when installing a Flatpak from Flathub is the following error output.

"error: Unable to load summary from remote flathub: Can't fetch summary from disabled remote 'flathub,"

The fix is simple, run the following command to enable Flathub.

flatpak remote-modify --enable flathub

This will fix the issue the above issue. The next issue can be access to system files. I would only recommend using the following command if you have access permission with your installation accessing files; use the override command below.

sudo flatpak override org.kde.kdevelop --filesystem=host

Please do not use this command by default unless it is needed.

How to Launch KDevelop

Now, the best method to launch KDevelop is using the application icon.

Activities > Show Applications > KDevelop

Example:

Alternatively, you may want to use it for applications quite frequently. Right-click the icon and add it to favorites, making the icons appear on the taskbar.

Once open, you will land at the default application start screen. For first-time users, I would strongly recommend visiting the KDevelop Wiki, which has many free resources to help you.

Example:

Additional Commands & Tips

How to Update KDevelop

Next are the commands to run in your terminal to check for updates. These commands will blanket-check all installed packages on your system that match the installation package manager. Ideally, you should run this regardless, even if auto-updates are set up to ensure your system is up-to-date, and no update errors occur for newer users.

For APT installations, use the standard APT update and APT upgrade commands.

sudo apt update && sudo apt upgrade

For snap installations, you can force a refresh that will update all snap packages using the following command in your terminal.

sudo snap refresh

Like Snap, Flatpak installations can use the following command in their terminal, which will check and refresh all Flatpak packages and prompt you if an update is available.

flatpak update

How to Remove (Uninstall) KDevelop

For users that installed the APT version, remove the application as follows.

sudo apt autoremove kdevelop --purge -y

Snap installations use the following command.

sudo snap remove --purge kdevelop

Lastly, to remove the Flatpack version, run the following command.

flatpak uninstall --delete-data org.kde.kdevelop -y

Another handy hint can be to use the following command to ensure Flatpak has not left behind any unnecessary packages as it is known to sometimes.

flatpak remove --unused

Conclusion

If you are looking for a powerful and free IDE, KDevelop is an excellent option that you should consider. The following tutorial has demonstrated three methods using the most popular package managers on Ubuntu to install KDevelop with CLI, along with how to update and remove the IDE software in the future.

https://www.computingpost.com/how-to-install-kdevelop-on-ubuntu-22-10-22-04-20-04/?feed_id=23625&_unique_id=63a97a0185104

--

--

ComputingPost

ComputingPost — Linux Howtos, Tutorials, Guides, News, Tips and Tricks.