Can't compile ZFS from sources for Ubuntu Lunar

Mario Marietto marietto2008 at gmail.com
Mon Jun 19 00:02:54 UTC 2023


 <https://askubuntu.com/posts/1473181/timeline>

Hello.

I tried to compile ZFS from sources for Ubuntu Lunar,but it failed. This is
the tutorial that I've followed :

https://uptrace.dev/blog/ubuntu-install-zfs.html


this is the full log:


sudo apt install build-essential autoconf automake libtool
gawk alien fakeroot dkms libblkid-dev uuid-dev libudev-dev
libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev
linux-headers-$(uname -r) python3 python3-dev python3-
setuptools python3-cffi libffi-dev python3-packaging git


Compile ZFS:


git clone https://github.com/openzfs/zfs
cd ./zfs
git checkout master


Already on 'master'. Your branch is up to date with 'origin/master'.


sh autogen.sh

https://pastebin.ubuntu.com/p/bpcqTg3FRV/


# sudo ./configure

https://pastebin.ubuntu.com/p/r5RtFvqxvN/


# sudo make -s -j$(nproc)

https://pastebin.ubuntu.com/p/crZyh4xcZW/


Unmount existing ZFS datasets and export pools:


sudo zfs unmount -a


The ZFS modules cannot be auto-loaded.

Try running 'modprobe zfs' as root to manually load them

modprobe: FATAL: Module zfs not found in directory /lib/modules/6.2.0-23-generic


sudo zpool export -a


The ZFS modules cannot be auto-loaded.

Try running 'modprobe zfs' as root to manually load them.


sudo systemctl stop zfs-send


Failed to stop zfs-send.service: Unit zfs-send.service not loaded.

Unload existing ZFS modules:


sudo ./scripts/zfs.sh -u = OK


Install newly compiled ZFS:


sudo make install

https://pastebin.ubuntu.com/p/ztYb89g8KQ/

sudo ldconfig = OK
sudo depmod


depmod: ERROR: could not open directory /lib/modules/6.2.0-23-generic:
No such file or directory

Load freshly built Linux modules:


sudo ./scripts/zfs.sh = OK


Failed to load /home/ziomario/Scaricati/zfs/module/zfs.ko

And make sure that ZFS services are enabled:


sudo systemctl enable zfs.target zfs-import.target zfs-mount.service
zfs-import-cache.service zfs-import-scan.service


Synchronizing state of zfs-mount.service with SysV service script with
/lib/systemd/systemd-sysv-install.

Executing: /lib/systemd/systemd-sysv-install enable zfs-mount


zpool import -f -R /mnt/zroot2 zroot2


The ZFS modules cannot be auto-loaded.

Try running 'modprobe zfs' as root to manually load them.


# sudo modprobe zfs


modprobe: FATAL: Module zfs not found in directory /lib/modules/6.2.0-23-generic


how to fix it ? very thanks.


-- 
Mario.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20230619/bc637ca4/attachment.html>


More information about the ubuntu-users mailing list