Closed
Description
System information
Type | Version/Name |
---|---|
Distribution Name | Ubuntu GNU/Linux 24.04 |
Distribution Version | 24.04 Noble |
Kernel Version | 6.5.0-28-generic |
Architecture | amd64 |
OpenZFS Version | zfs-2.2.3-1 , zfs-kmod-2.2.3-1 |
Describe the problem you're observing
While building OpenZFS on a (to be officially released in a few days) Ubuntu 24.04 System, openzfs-dkms Package fails to install due to missing python3-distutils
Package.
This Package has been removed as of Python 3.12.
Since Ubuntu 24.04 ships with Python 3.12, this blocks the installation of OpenZFS Packages.
Renaming openzfs-libzpool5-dbgsym_2.2.3-1_amd64.deb to openzfs-libzpool5-dbgsym_2.2.3-1_amd64.ddeb
dpkg-deb: building package 'openzfs-python3-pyzfs' in '../openzfs-python3-pyzfs_2.2.3-1_amd64.deb'.
dpkg-deb: building package 'openzfs-pyzfs-doc' in '../openzfs-pyzfs-doc_2.2.3-1_all.deb'.
dpkg-deb: building package 'openzfs-libzfs4' in '../openzfs-libzfs4_2.2.3-1_amd64.deb'.
dpkg-deb: building package 'openzfs-libzfs4-dbgsym' in 'debian/.debhelper/scratch-space/build-openzfs-libzfs4/openzfs-libzfs4-dbgsym_2.2.3-1_amd64.deb'.
Renaming openzfs-libzfs4-dbgsym_2.2.3-1_amd64.deb to openzfs-libzfs4-dbgsym_2.2.3-1_amd64.ddeb
dpkg-deb: building package 'openzfs-zfs-initramfs' in '../openzfs-zfs-initramfs_2.2.3-1_all.deb'.
dpkg-deb: building package 'openzfs-zfs-dracut' in '../openzfs-zfs-dracut_2.2.3-1_all.deb'.
dpkg-deb: building package 'openzfs-zfs-test-dbgsym' in 'debian/.debhelper/scratch-space/build-openzfs-zfs-test/openzfs-zfs-test-dbgsym_2.2.3-1_amd64.deb'.
Renaming openzfs-zfs-test-dbgsym_2.2.3-1_amd64.deb to openzfs-zfs-test-dbgsym_2.2.3-1_amd64.ddeb
make[1]: Leaving directory '/usr/src/zfs/zfs-2.2.3'
dpkg-genbuildinfo --build=binary -O../openzfs-linux_2.2.3-1_amd64.buildinfo
dpkg-genchanges --build=binary -O../openzfs-linux_2.2.3-1_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
dpkg-source --after-build .
dpkg-buildpackage: info: binary-only upload (no source included)
make: *** No rule to make target 'native-deb-dkms'. Stop.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'openzfs-libnvpair3' instead of './openzfs-libnvpair3_2.2.3-1_amd64.deb'
Note, selecting 'openzfs-libpam-zfs' instead of './openzfs-libpam-zfs_2.2.3-1_amd64.deb'
Note, selecting 'openzfs-libuutil3' instead of './openzfs-libuutil3_2.2.3-1_amd64.deb'
Note, selecting 'openzfs-libzfs4' instead of './openzfs-libzfs4_2.2.3-1_amd64.deb'
Note, selecting 'openzfs-libzpool5' instead of './openzfs-libzpool5_2.2.3-1_amd64.deb'
Note, selecting 'openzfs-zfs-dkms' instead of './openzfs-zfs-dkms_2.2.3-1_all.deb'
Note, selecting 'openzfs-zfs-initramfs' instead of './openzfs-zfs-initramfs_2.2.3-1_all.deb'
Note, selecting 'openzfs-zfsutils' instead of './openzfs-zfsutils_2.2.3-1_amd64.deb'
Note, selecting 'openzfs-zfs-zed' instead of './openzfs-zfs-zed_2.2.3-1_amd64.deb'
openzfs-libuutil3 is already the newest version (2.2.3-1).
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:
python3 : Conflicts: python3-distutils but 3.11.5-1 is to be installed
Conflicts: python3-distutils:i386
python3-distutils : Depends: python3-lib2to3 (= 3.11.5-1) but 3.12.3-0ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
Describe how to reproduce the problem
- Install Ubuntu 24.04 (or most likely any Debian-based System) with Python 3.12
- Try to compile OpenZFS 2.2.3 from Source
Include any warning/errors/backtraces from the system logs
See previous Section.
Proposed Fix
I tried to do some REGEX using sed
in a build script, but it doesn't really work that well (from within the unpacked zfs-2.2.3
Archive downloaded from the OpenZFS repository):
#sed -Ei "s/, python3-distutils | libpython3-stdlib (<< 3.6.4), /, /g" ./debian/openzfs-zfs-dkms/DEBIAN/control
#sed -Ei "s/python3-distutils | libpython3-stdlib (<< 3.6.4),//g" ./contrib/debian/control
#sed -Ei "s/python3-distutils | libpython3-stdlib (<< 3.6.4),//g" ./debian/control
Basically, either:
- Remove these Requirements altogether (the part
python3-distutils | libpython3-stdlib (<< 3.6.4)
) - Add an Extra Condition:
python3 >> 3.12 | python3-distutils | libpython3-stdlib (<< 3.6.4)
The second Solution is most likely preferable due to compatibility with Debian and Debian-based Distributions featuring older Versions of Python.