Install KDevelop on Ubuntu 22.10/22.04/20.04
You’ll learn how to get KDevelop up and running on the latest Ubuntu releases without wrestling with broken packages or endless dependency wars. The steps below keep it simple, cover both APT and Snap options, and point out a few quirks you might run into.
Why bother?
If you’re a C++ fan, Qt developer, or just want a full‑featured IDE that feels native on Linux, KDevelop is worth the effort. I’ve seen people drop their old Code::Blocks setup for this one; once it’s installed, you’ll wonder how you ever lived without its project wizard.
1. Make sure your system is up to date
sudo apt update && sudo apt upgrade -y
Updating first avoids “missing dependency” errors when pulling in the IDE and its libraries.
2. Install from the official Ubuntu repositories (recommended)
All three Ubuntu releases ship KDevelop as a single package named kdevelop. Just run:
sudo apt install kdevelop
You’ll get the stable 5.x series, which matches the Qt 5 toolkit bundled with your distro.
Why this matters:
The repository build is tested against your exact OS version. That means fewer runtime surprises and a smoother integration with GNOME or KDE desktops.
3. If you need a newer KDevelop
The official package may lag behind the latest release (e.g., 5.9 vs. 5.13). Two options:
3a. Snap (the quick, all‑in‑one route)
sudo snap install kdevelop --classic
Snaps bundle their own dependencies, so you’ll get a newer version without messing with your system libraries. The downside? A slightly larger footprint and occasional startup lag.
3b. Build from source
If you’re comfortable compiling, grab the tarball from KDE’s website and run:
./configure && make && sudo make install
You’ll need development packages (libqt5, libkf5, etc.). This is for advanced users who want bleeding‑edge features or custom patches.
4. Common pitfalls to watch out for
- Qt library mismatch
I once upgraded Qt5 on Ubuntu 20.04 and KDevelop kept crashing when opening a project. Removing the old libqt5* packages and reinstalling KDEvelop fixed it. If you see “cannot find Qt5Core.so” errors, that’s the culprit.
- Permission issues on Snap
The classic confinement can block access to your home directory if you’re running in strict mode. Try adding $HOME/.config/kdevelop/ to the Snap's file permissions or use the APT route instead.
- Missing plugins
After a fresh install, “C++” and “Qt5” support may be greyed out. Install the kdevplatform5 package:
sudo apt install kdevplatform5
That brings in the language support modules KDevelop needs.
5. Quick sanity check
Open a terminal and type:
kdevelop --version
You should see something like KDEvelop (5.x) printed out. If not, double‑check that the binary is on your $PATH (/usr/bin/kdevelop for APT installs).
6. Getting started
Once it launches, let KDevelop index your home folder. Then:
1. Create a new C++ project => Project > New.
2. Point it to /usr/include and any external libraries you need.
3. Hit “Build” and watch the compile output in real time.
Happy coding! If you hit snags, drop a comment or ping me on the forum; I’ve wrestled with KDevelop on every Ubuntu version since 18.04.