I am trying to install qemu-kvm
on my VMware with Ubuntu 16.04 x64 bit.
While trying to do so with this command: apt-get install qemu-kvm
, it failed with the following errors:
root@ubuntu:~/Desktop/# apt-get install qemu-kvm
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
qemu-kvm : Depends: qemu-common (>= 1.0+noroms-0ubuntu14.31) but it is not going to be installed
Depends: qemu-utils (>= 1.0+noroms-0ubuntu14.31) but it is not going to be installed
Depends: upstart-job
E: Unable to correct problems, you have held broken packages.
I tried the solution from this forum but they didn't help:
sudo sed -i s/pk.archive.ubuntu.com/archive.ubuntu.com/ /etc/apt/sources.list
sudo apt-get update
These are the sources installed on my system:
root@ubuntu:~/Desktop/# grep -n "^[^#]" /etc/apt/sources.list{,.d/*}
/etc/apt/sources.list:6:deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
/etc/apt/sources.list:7:deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
/etc/apt/sources.list:10:deb http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
/etc/apt/sources.list:11:deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
/etc/apt/sources.list:12:deb http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
/etc/apt/sources.list:13:deb-src http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
/etc/apt/sources.list:14:deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
/etc/apt/sources.list:15:deb-src http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
/etc/apt/sources.list:18:deb http://archive.canonical.com/ubuntu precise partner
/etc/apt/sources.list:19:deb-src http://archive.canonical.com/ubuntu precise partner
/etc/apt/sources.list:22:deb http://extras.ubuntu.com/ubuntu precise main
/etc/apt/sources.list:23:deb-src http://extras.ubuntu.com/ubuntu precise main
/etc/apt/sources.list.d/docker.list:1:deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial edge
/etc/apt/sources.list.d/kubernetes.list:1:deb https://apt.kubernetes.io/ kubernetes-xenial main
/etc/apt/sources.list.d/notepadqq-team-ubuntu-notepadqq-xenial.list:1:deb http://ppa.launchpad.net/notepadqq-team/notepadqq/ubuntu xenial main
/etc/apt/sources.list.d/sublime-text.list:1:deb https://download.sublimetext.com/ apt/stable/
This is my OS (VMware Ubuntu 16.04 x64 bit) information:
Linux ubuntu 4.15.0-45-generic #48~16.04.1-Ubuntu SMP Tue Jan 29 18:03:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
EDIT:
comparing to @Christian Ehrhardt answer.
root@ubuntu:~/Desktop# apt-cache policy qemu-kvm qemu-common qemu-utils
qemu-kvm:
Installed: (none)
Candidate: 1.0+noroms-0ubuntu14.31
Version table:
1.0+noroms-0ubuntu14.31 500
500 http://us.archive.ubuntu.com/ubuntu precise-security/main amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu precise-updates/main amd64 Packages
1.0+noroms-0ubuntu13 500
500 http://us.archive.ubuntu.com/ubuntu precise/main amd64 Packages
qemu-common:
Installed: (none)
Candidate: 1.0+noroms-0ubuntu14.31
Version table:
1.0+noroms-0ubuntu14.31 500
500 http://us.archive.ubuntu.com/ubuntu precise-security/main amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu precise-security/main i386 Packages
500 http://us.archive.ubuntu.com/ubuntu precise-updates/main amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu precise-updates/main i386 Packages
1.0+noroms-0ubuntu13 500
500 http://us.archive.ubuntu.com/ubuntu precise/main amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu precise/main i386 Packages
qemu-utils:
Installed: 1:2.5+dfsg-5ubuntu10.34
Candidate: 1:2.5+dfsg-5ubuntu10.34
Version table:
*** 1:2.5+dfsg-5ubuntu10.34 100
100 /var/lib/dpkg/status
1.0+noroms-0ubuntu14.31 500
500 http://us.archive.ubuntu.com/ubuntu precise-security/main amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu precise-updates/main amd64 Packages
1.0+noroms-0ubuntu13 500
500 http://us.archive.ubuntu.com/ubuntu precise/main amd64 Packages
Checking the upstart-job
:
root@ubuntu:~/Desktop# apt-cache show upstart | grep '^Prov'
Provides: startup-tasks, system-services, upstart-compat-sysv, upstart-job
Provides: startup-tasks, system-services, upstart-compat-sysv, upstart-job
Provides: startup-tasks, system-services, upstart-compat-sysv, upstart-job
apt install qemu-common=1.0+noroms-0ubuntu14.31
(Note: the reporter already found that in his case qemu-utils was the troublemaker) – Christian Ehrhardt Mar 19 '19 at 06:29