Installing libudev-dev breaks the system by removing essential packages

Asked by Henrique Fingler

 I just installed Ubuntu 22.04.1 from 18.04 in my server. I'm using custom kernels for development so I tried to compile it.

 After trying it once, after make install I get this error:

iny-initramfs: Generating /boot/initrd.img-5.15.68
/usr/sbin/mktirfs: WARNING: / file system on device mapper, not supported by tiny-initramfs
YOUR SYSTEM WILL NOT BOOT WITH THIS INITRAMFS.

I replaced it back with initramfs-tools, only to find out after boot that netplan was gone.
I found that the source of this is when installing the dependencies listed in https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
coming from packages libpci-dev and libudev-dev.

  $ sudo apt install libudev-dev
  ...
  The following packages will be REMOVED:
  initramfs-tools initramfs-tools-core netplan.io ubuntu-drivers-common ubuntu-minimal ubuntu-server ubuntu-server-minimal ubuntu-standard (and many others)
  The following NEW packages will be installed:
  emacs-lucid libudev-dev libxmu6 tiny-initramfs tiny-initramfs-core xaw3dg

Is this correct behavior?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu systemd Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Maybe related to a stopped phased update of systemd, https://people.canonical.com/~ubuntu-archive/phased-updates.html

For diagnostic purposes please provide the output that you receive for the following commands:

uname -a
lsb_release -crid
apt policy udev libudev-dev

"I just installed Ubuntu 22.04.1 from 18.04"
How did you "install Ubuntu 22.04.1 from 18.04"? Did you execute a release upgrade, or what kind of install/upgrade did you perform?

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

Please also provide (the gist of) the output of

apt --simulate install lubudev-dev=249.11-0ubuntu3.6

Revision history for this message
Henrique Fingler (hfingler) said :
#3

Linux installation was using 22.04.1 server image. Installed by mounting an ISO on a virtual cdrom, using all default options during installation.

uname -a (at the time I wrote this question, now I'm at 5.15.68)
Linux santacruz 5.15.0-43-generic #3 SMP Tue Sep 27 02:28:08 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

udev:
  Installed: 249.11-0ubuntu3.4
  Candidate: 249.11-0ubuntu3.6
  Version table:
     249.11-0ubuntu3.6 500 (phased 0%)
        500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
 *** 249.11-0ubuntu3.4 100
        100 /var/lib/dpkg/status
     249.11-0ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
libudev-dev:
  Installed: (none)
  Candidate: 249.11-0ubuntu3.6
  Version table:
     249.11-0ubuntu3.6 500 (phased 0%)
        500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
     249.11-0ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages

Here's the gist for the apt simulate: https://gist.github.com/hfingler/322ca816d598c7a92dbc10048cd61bb3

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

Sorry, my fault, should have been asking for
apt --simulate install libudev-dev=249.11-0ubuntu3.4
but I assume that this fails with "libudev-dev version 249.11-0ubuntu3.4 not found".

Try the following:

Download the file http://launchpadlibrarian.net/610016737/libudev-dev_249.11-0ubuntu3.4_amd64.deb
and then execute
dpkg --simulate --install libudev-dev_249.11-0ubuntu3.4_amd64.deb

What are the results?

Revision history for this message
Henrique Fingler (hfingler) said :
#5

Yes, apt --simulate install libudev-dev=249.11-0ubuntu3.4 prints:

E: Version '249.11-0ubuntu3.4' for 'libudev-dev' was not found

$ sudo dpkg --simulate --install libudev-dev_249.11-0ubuntu3.4_amd64.deb

Selecting previously unselected package libudev-dev:amd64.
(Reading database ... 143456 files and directories currently installed.)
Preparing to unpack libudev-dev_249.11-0ubuntu3.4_amd64.deb ...

Revision history for this message
Manfred Hampl (m-hampl) said (last edit ):
#6

This looks good, no complaints about broken dependencies (that would result in packages uninstalled by the apt command)

Try the real execution:

sudo dpkg --install libudev-dev_249.11-0ubuntu3.4_amd64.deb

Revision history for this message
Henrique Fingler (hfingler) said :
#7

I found that this package is not necessary for compiling the kernel, so I don't need to install it.
Unless you want me to do it so we can finalize this issue. Let me know.

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#8

If you don't need it, then I do not see a reason for installing it.

Revision history for this message
Henrique Fingler (hfingler) said :
#9

Thanks for the help!
Hopefully that issue is fixed soon and no one else runs into it.

Revision history for this message
Henrique Fingler (hfingler) said :
#10

Thanks Manfred Hampl, that solved my question.