libudev1 (jammy-updates) 删除了许多软件包

libudev1 (jammy-updates) 删除了许多软件包

从 jammy-updates安装libudev1 249.11-0ubuntu3.1会删除许多软件包。可能是什么原因?

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

# apt install libudev1
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  bolt busybox-initramfs cryptsetup finalrd fwupd-signed
  gir1.2-packagekitglib-1.0 initramfs-tools-bin klibc-utils libappstream4
  libarchive13 libatasmart4 libblockdev-crypto2 libblockdev-fs2
  libblockdev-loop2 libblockdev-part-err2 libblockdev-part2 libblockdev-swap2
  libblockdev-utils2 libblockdev2 libdw1 libflashrom1 libftdi1-2 libfwupd2
  libfwupdplugin5 libgcab-1.0-0 libglib2.0-bin libgpgme11 libgstreamer1.0-0
  libgudev-1.0-0 libgusb2 libisns0 libjcat1 libjson-glib-1.0-0
  libjson-glib-1.0-common libklibc libmbim-glib4 libmbim-proxy libmm-glib0
  libnetplan0 libnspr4 libnss3 libopeniscsiusr libpackagekit-glib2-18
  libparted-fs-resize0 libplymouth5 libpolkit-agent-1-0 libpolkit-gobject-1-0
  libqmi-glib5 libqmi-proxy libsgutils2-2 libsmbios-c2 libstemmer0d libtcl8.6
  libudisks2-0 liburcu8 libvolume-key1 libxmlb2 python3-software-properties
  sg3-utils squashfs-tools tcl tcl8.6 usb-modeswitch usb-modeswitch-data
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  cloud-init cloud-initramfs-copymods cloud-initramfs-dyn-netconf
  cryptsetup-initramfs dbus-user-session friendly-recovery fwupd
  initramfs-tools initramfs-tools-core kpartx libnss-systemd libpam-systemd
  libtss2-esys-3.0.2-0 libtss2-mu0 libtss2-sys1 libtss2-tcti-cmd0
  libtss2-tcti-device0 libtss2-tcti-mssim0 libtss2-tcti-swtpm0 mdadm
  modemmanager multipath-tools netplan.io open-iscsi overlayroot packagekit
  packagekit-tools pkexec plymouth plymouth-theme-ubuntu-text policykit-1
  polkitd sg3-utils-udev snapd software-properties-common tpm-udev
  ubuntu-minimal ubuntu-server ubuntu-standard udev udisks2
The following packages will be upgraded:
  libudev1
1 upgraded, 0 newly installed, 41 to remove and 21 not upgraded.
Need to get 76.9 kB of archives.
After this operation, 125 MB disk space will be freed.
Do you want to continue? [Y/n]


Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libudev1 amd64 249.11-0ubuntu3.1 [76.9 kB]
Fetched 76.9 kB in 1s (79.6 kB/s)
(Reading database ... 63758 files and directories currently installed.)
Removing cloud-init (22.1-14-g2e17a0d6-0ubuntu1~22.04.5) ...
Removing ubuntu-server (1.481) ...
Removing cloud-initramfs-copymods (0.47ubuntu1) ...
Removing cloud-initramfs-dyn-netconf (0.47ubuntu1) ...
Removing cryptsetup-initramfs (2:2.4.3-1ubuntu1) ...
update-initramfs: deferring update (trigger activated)
Removing snapd (2.55.3+22.04) ...
Stopping snap.amazon-ssm-agent.amazon-ssm-agent.service
Stopping unit snap.amazon-ssm-agent.amazon-ssm-agent.service
Waiting until unit snap.amazon-ssm-agent.amazon-ssm-agent.service is stopped [attempt 1]
snap.amazon-ssm-agent.amazon-ssm-agent.service is stopped.
Stopping snap.lxd.activate.service
Stopping unit snap.lxd.activate.service
Waiting until unit snap.lxd.activate.service is stopped [attempt 1]
snap.lxd.activate.service is stopped.
Stopping snap.lxd.daemon.service
Stopping unit snap.lxd.daemon.service
Waiting until unit snap.lxd.daemon.service is stopped [attempt 1]
snap.lxd.daemon.service is stopped.
Stopping snap.lxd.user-daemon.service
Stopping unit snap.lxd.user-daemon.service
Waiting until unit snap.lxd.user-daemon.service is stopped [attempt 1]
snap.lxd.user-daemon.service is stopped.
grep: /etc/systemd/system/snap.lxd.workaround.service: No such file or directory
Skipping non-snapd systemd unit snap.lxd.workaround.service
Stopping snap.lxd.daemon.unix.socket
Stopping unit snap.lxd.daemon.unix.socket
Waiting until unit snap.lxd.daemon.unix.socket is stopped [attempt 1]
snap.lxd.daemon.unix.socket is stopped.
Stopping snap.lxd.user-daemon.unix.socket
Stopping unit snap.lxd.user-daemon.unix.socket
Waiting until unit snap.lxd.user-daemon.unix.socket is stopped [attempt 1]
snap.lxd.user-daemon.unix.socket is stopped.
Warning: Stopping snapd.service, but it can still be activated by:
  snapd.socket
Removing dbus-user-session (1.12.20-2ubuntu4) ...
Removing friendly-recovery (0.2.42) ...
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/40-force-partuuid.cfg'
Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
GRUB_FORCE_PARTUUID is set, will attempt initrdless boot
Found linux image: /boot/vmlinuz-5.15.0-1004-aws
Found initrd image: /boot/microcode.cpio /boot/initrd.img-5.15.0-1004-aws
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
Removing fwupd (1.7.5-3) ...
Removing multipath-tools (0.8.8-1ubuntu1) ...
Warning: Stopping multipath-tools.service, but it can still be activated by:
  multipathd.socket
Removing sg3-utils-udev (1.46-1build1) ...
update-initramfs: deferring update (trigger activated)
Removing overlayroot (0.47ubuntu1) ...
Removing initramfs-tools (0.140ubuntu13) ...
Removing initramfs-tools-core (0.140ubuntu13) ...
Removing kpartx (0.8.8-1ubuntu1) ...
Removing libnss-systemd:amd64 (249.11-0ubuntu3) ...
Checking NSS setup...
Removing ubuntu-standard (1.481) ...
Removing software-properties-common (0.99.22) ...
Removing packagekit-tools (1.2.5-2ubuntu2) ...
Removing packagekit (1.2.5-2ubuntu2) ...
Removing modemmanager (1.18.6-1) ...
Unknown option: runtime
Removing policykit-1 (0.105-33) ...
Removing pkexec (0.105-33) ...
Removing polkitd (0.105-33) ...
Removing libpam-systemd:amd64 (249.11-0ubuntu3) ...
Removing libtss2-esys-3.0.2-0:amd64 (3.2.0-1ubuntu1) ...
Removing libtss2-tcti-swtpm0:amd64 (3.2.0-1ubuntu1) ...
Removing libtss2-tcti-mssim0:amd64 (3.2.0-1ubuntu1) ...
Removing libtss2-sys1:amd64 (3.2.0-1ubuntu1) ...
Removing libtss2-tcti-cmd0:amd64 (3.2.0-1ubuntu1) ...
Removing libtss2-tcti-device0:amd64 (3.2.0-1ubuntu1) ...
Removing mdadm (4.2-0ubuntu1) ...
Removing ubuntu-minimal (1.481) ...
Removing netplan.io (0.104-0ubuntu2) ...
dpkg: warning: while removing netplan.io, directory '/usr/share/netplan/netplan/cli/commands' not empty so not removed
dpkg: warning: while removing netplan.io, directory '/etc/netplan' not empty so not removed
Removing open-iscsi (2.1.5-1ubuntu1) ...
Warning: Stopping iscsid.service, but it can still be activated by:
  iscsid.socket
Removing plymouth-theme-ubuntu-text (0.9.5+git20211018-1ubuntu3) ...
Removing plymouth (0.9.5+git20211018-1ubuntu3) ...
Removing udisks2 (2.9.4-1ubuntu2) ...
Removing libtss2-mu0:amd64 (3.2.0-1ubuntu1) ...
Removing tpm-udev (0.6) ...
Removing udev (249.11-0ubuntu3) ...
(Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%(Reading database ... 62205 files and directories currently installed.)
Preparing to unpack .../libudev1_249.11-0ubuntu3.1_amd64.deb ...
Unpacking libudev1:amd64 (249.11-0ubuntu3.1) over (249.11-0ubuntu3) ...
Setting up libudev1:amd64 (249.11-0ubuntu3.1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for dbus (1.12.20-2ubuntu4) ...
Processing triggers for libc-bin (2.35-0ubuntu3) ...

更新

如何重现

使用 Ubuntu 云映像启动 AWS EC2 实例。

在这种情况下,使用ami-0ee8244746ec5d6d4(区域=us-west-2,发布=20220420)。

以 ubuntu 用户身份登录后,成为 root 并运行apt update

sudo -i
apt update

我想要安装的包是liblvm2-dev,但它试图删除、、cloud-init和许多其他包。snapdudevubuntu-standard

apt install liblvm2-dev
...
The following packages will be REMOVED:
  cloud-init cloud-initramfs-copymods cloud-initramfs-dyn-netconf cryptsetup-initramfs
  dbus-user-session friendly-recovery fwupd initramfs-tools initramfs-tools-core kpartx
  libnss-systemd libpam-systemd libtss2-esys-3.0.2-0 libtss2-mu0 libtss2-sys1 libtss2-tcti-cmd0
  libtss2-tcti-device0 libtss2-tcti-mssim0 libtss2-tcti-swtpm0 mdadm modemmanager multipath-tools
  netplan.io open-iscsi overlayroot packagekit packagekit-tools pkexec plymouth
  plymouth-theme-ubuntu-text policykit-1 polkitd sg3-utils-udev snapd software-properties-common
  tpm-udev ubuntu-minimal ubuntu-server ubuntu-standard udev udisks2
...

为什么要尝试删除这么多包?

依赖链liblvm2-dev如下所示:

liblvm2-dev
Depends: liblvm2cmd2.03 (= 2.03.11-2.1ubuntu4), libdevmapper-dev

libdevmapper-dev
Depends: libdevmapper1.02.1 (= 2:1.02.175-2.1ubuntu4), libdevmapper-event1.02.1 (= 2:1.02.175-2.1ubuntu4), libudev-dev, libselinux1-dev

libudev-dev
Depends: libudev1 (= 249.11-0ubuntu3.1)

libudev-dev未安装并尝试安装最新的249.11-0ubuntu3.1,但libudev1libudev-dev依赖)已安装旧版本249.11-0ubuntu3,我想这会导致一些问题。

我想知道

我找到了一种解决方法,即在 之前执行apt install udev或。apt upgradeapt install liblvm2-dev

但是,由于无论哪种方式都没有安装,我认为发布libudev-dev新版本时也会出现同样的问题。249.11-0ubuntu3.2

我也担心其他包可能会导致同样的问题。

这就是为什么我感兴趣知道如何解决问题的根源。

如果您还有什么需要我帮忙的,请告诉我。

相关内容