0

I'm following a tutorial on how to install Libvirt on Ubuntu 22.04. However I'm stuck at this step now:

$ sudo apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvirt-clients bridge-utils 
[sudo] password for zulh: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'qemu-system-x86' instead of 'qemu-kvm'
bridge-utils is already the newest version (1.7-1ubuntu3).
libvirt-clients is already the newest version (8.0.0-1ubuntu7).
virt-manager is already the newest version (1:4.0.0-1).
virtinst is already the newest version (1:4.0.0-1).
qemu-system-x86 is already the newest version (1:6.2+dfsg-2ubuntu6.2).
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:
 libvirt-daemon-system-systemd : Depends: systemd-container
E: Unable to correct problems, you have held broken packages.

When I tried to install systemd-container, this error appeared:

$ sudo apt install -y systemd-container
Reading package lists... Done
Building dependency tree... Done
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:
 apt : Depends: libapt-pkg6.0 (>= 2.4.8) but it is not going to be installed
       Depends: libsystemd0 but it is not installable
 bsdutils : PreDepends: libsystemd0 but it is not installable
 init : PreDepends: systemd-sysv
 libacl1:i386 : Depends: libc6:i386 (>= 2.33) but it is not installable
 libapparmor1:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
 libargon2-1:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
 libaudit1:i386 : Depends: libc6:i386 (>= 2.33) but it is not installable
 libblkid1:i386 : Depends: libc6:i386 (>= 2.33) but it is not installable
 libcap-ng0:i386 : Depends: libc6:i386 (>= 2.33) but it is not installable
 libcap2:i386 : Depends: libc6:i386 (>= 2.33) but it is not installable
 libcrypt1:i386 : Depends: libc6:i386 (>= 2.25) but it is not installable
 libcryptsetup12:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
 libdevmapper1.02.1:i386 : Depends: libc6:i386 (>= 2.33) but it is not installable
                           Recommends: dmsetup:i386 (>= 2:1.02.175-2.1ubuntu4~)
 libffi8:i386 : Depends: libc6:i386 (>= 2.27) but it is not installable
 libgcrypt20:i386 : Depends: libc6:i386 (>= 2.33) but it is not installable
 libgmp10:i386 : Depends: libc6:i386 (>= 2.7) but it is not installable
 libgnutls30:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
 libgpg-error0:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
 libhogweed6:i386 : Depends: libc6:i386 (>= 2.4) but it is not installable
 libidn2-0:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
 libip4tc2:i386 : Depends: libc6:i386 (>= 2.28) but it is not installable
 libjson-c5:i386 : Depends: libc6:i386 (>= 2.33) but it is not installable
 libkmod2:i386 : Depends: libc6:i386 (>= 2.33) but it is not installable
 liblz4-1:i386 : Depends: libc6:i386 (>= 2.4) but it is not installable
 liblzma5:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
 libmount1:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
 libnettle8:i386 : Depends: libc6:i386 (>= 2.4) but it is not installable
 libp11-kit0:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
 libpam0g:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
 libpcre2-8-0:i386 : Depends: libc6:i386 (>= 2.4) but it is not installable
 libseccomp2:i386 : Depends: libc6:i386 (>= 2.4) but it is not installable
 libselinux1:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
 libssl3:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
 libsystemd0:i386 : PreDepends: libc6:i386 (>= 2.34) but it is not installable
 libtasn1-6:i386 : Depends: libc6:i386 (>= 2.4) but it is not installable
 libudev1:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
 libunistring2:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
 libuuid1:i386 : Depends: libc6:i386 (>= 2.28) but it is not installable
                 Recommends: uuid-runtime:i386
 libzstd1:i386 : Depends: libc6:i386 (>= 2.4) but it is not installable
 shim-signed : Depends: grub-efi-amd64-signed but it is not going to be installed or
                        grub-efi-arm64-signed but it is not installable
               Depends: grub2-common (>= 2.04-1ubuntu24)
 systemd:i386 : PreDepends: libc6:i386 (>= 2.34) but it is not installable
                Recommends: default-dbus-system-bus:i386 or
                            dbus-system-bus:i386
                Recommends: networkd-dispatcher:i386 but it is not installable
                Recommends: systemd-timesyncd:i386 or
                            time-daemon:i386
 systemd-container : Depends: default-dbus-system-bus or
                              dbus-system-bus
 util-linux : PreDepends: libsystemd0 but it is not installable
              PreDepends: libudev1 (>= 183) but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

What can I do to fix this?

FWIW, below is my host details. I'm using 64 bit.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy

$ uname -r
5.15.0-53-generic

1 Answer 1

0

I figured it out after reading these two questions:

When I ran apt-cache policy systemd systemd-container, the server wasn't US server.

After I changed to US server, the output changed to:

$ apt-cache policy systemd systemd-container
systemd:
  Installed: 249.11-0ubuntu3.6
  Candidate: 249.11-0ubuntu3.6
  Version table:
 *** 249.11-0ubuntu3.6 100
        100 /var/lib/dpkg/status
     249.11-0ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
systemd-container:
  Installed: (none)
  Candidate: 249.11-0ubuntu3
  Version table:
     249.11-0ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

The sudo apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvirt-clients bridge-utils command finally worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.