This is what apt prints when you follow an older KVM tutorial on a current Ubuntu:
Package qemu-kvm is a virtual package provided by:
qemu-system-x86
E: Package 'qemu-kvm' has no installation candidate
Install the package that actually provides the emulator:
sudo apt update
sudo apt install -y qemu-system-x86
On a 64-bit Intel or AMD machine that is the whole fix. Note that apt has already told you the answer — the line Package qemu-kvm is a virtual package provided by: qemu-system-x86 names the replacement before the error.
For a complete KVM host rather than just the emulator:
sudo apt install -y cpu-checker qemu-system-x86 libvirt-daemon-system libvirt-clients virtinst
Why apt knows the name but has nothing to install
The wording is precise, and it is different from Unable to locate package.
Unable to locate package means apt has never heard of the name. has no installation candidate means apt does know the name — other packages declare it, or it exists as a virtual package — but no repository you have configured offers an installable version. So the name is real; the package is not available to you.
qemu-kvm was the conventional name for years, and thousands of tutorials still say to install it. On the Ubuntu 26.04 LTS host used for our KVM installation guide, it is not available at all. On releases where it does still exist it is only a transitional convenience package whose entire job is to pull in qemu-system-x86. Installing qemu-system-x86 directly is correct on every release, which is why it is the fix rather than a workaround.
Confirm which case you are in
One command tells you whether the package is genuinely unavailable or your sources are misconfigured:
apt-cache policy qemu-kvm
qemu-kvm:
Installed: (none)
Candidate: (none)
Version table:
An empty version table and Candidate: (none) is the expected, normal result on a current Ubuntu. Nothing is broken — the package simply is not published for your release, and qemu-system-x86 is the answer.
If instead you see a candidate version listed but the install still fails, your repositories are fine and something else is blocking it. Check for apt pinning:
apt-cache policy
cat /etc/apt/preferences /etc/apt/preferences.d/* 2>/dev/null
Rule out a stale package index
Before concluding anything, make sure apt has ever downloaded a package list. On a freshly installed system, a minimal container image or a cloud image built without one, every unusual package produces this error:
sudo apt update
apt-cache policy qemu-system-x86
If apt update itself reports errors, fix those first — nothing will install until the index downloads cleanly. Release file ... is not valid yet points at a wrong system clock, and repeated 404s on a non-LTS release usually mean it has reached end of life and its repositories have moved to old-releases.ubuntu.com.
Check your architecture before choosing a package
qemu-system-x86 emulates x86 machines only. On ARM hardware — a Raspberry Pi, an Ampere cloud instance, an Apple Silicon VM — it is the wrong package and may itself have no installation candidate:
dpkg --print-architecture
| Architecture | Install |
|---|---|
amd64 | qemu-system-x86 |
arm64 | qemu-system-arm and qemu-efi-aarch64 |
armhf | qemu-system-arm |
To see every qemu-system-* package your sources actually offer:
apt-cache search '^qemu-system-'
That listing is the authoritative answer for your machine and beats guessing from a tutorial.
Check the universe repository
Most QEMU packages live in universe, which is enabled by default on Ubuntu Desktop and Server but is sometimes disabled on minimal, container and hardened images. Check and enable it:
grep -rh "^deb\|^Components" /etc/apt/sources.list /etc/apt/sources.list.d/ 2>/dev/null
sudo add-apt-repository universe
sudo apt update
Verify the install worked
Installing the package is not the same as having working virtualisation. Confirm both:
# The emulator is present
qemu-system-x86_64 --version
# The CPU supports hardware acceleration and it is enabled in firmware
sudo apt install -y cpu-checker
kvm-ok
kvm-ok should report KVM acceleration can be used. If it reports that the CPU does not support it, or that it is disabled by your BIOS, that is a firmware setting and is entirely separate from the apt error on this page — enable VT-x or AMD-V in the BIOS. Inside a cloud VM or a nested hypervisor it may simply be unavailable.
Then confirm libvirt is running and reachable:
systemctl status libvirtd --no-pager
virsh -c qemu:///system list --all
If virsh refuses with a permissions error, add yourself to the groups and start a new login session — group membership only applies to new sessions:
sudo usermod -aG libvirt,kvm "$USER"
Related guides
- How to install KVM on Ubuntu — the full host build this error interrupts, tested on Ubuntu 26.04 LTS
- pip: error: externally-managed-environment — the other packaging error that breaks copied tutorials on current Ubuntu
- No space left on device — if apt fails partway through installing the QEMU packages