Ubuntu – Error when installing ubuntu-zfs

zfs

I'm switching from FreeNAS to Ubuntu 12.04 LTS. After a vanilla install of Ubuntu has been completed I run the following commands in the order shown to install ZFS:

  1. apt-get install python-software-properties
  2. add-apt-repository ppa:zfs-native/stable
  3. apt-get -y -q update && apt-get -y -q upgrade
  4. apt-get install ubuntu-zfs

When the last command is run ZFS is installed and seems to be working correctly… mostly (more on that later). However, when the last command is run I get this error (full log here):

configure: error:
        *** Please make sure the kmod spl devel <kernel> package for your
        *** distribution is installed then try again.  If that fails you
        *** can specify the location of the spl objects with the
        *** '--with-spl-obj=PATH' option.

What is this error and how do I fix it?

Now I said mostly earlier because my pool's don't auto mount when the server restarts the way they should. All my reading (mostly from this page) indicates that mountall should just take care of the mounting. I have followed the instructions on that page and I cannot get mountall to work correctly. My pools will only auto mount on restart if I edit /etc/fstab or change the ZFS_MOUNT and ZFS_UNMOUNT options in /etc/default/zfs.

Best Answer

The following helped me on 14.04:

sudo apt-get remove spl-dkms zfs-dkms ubuntu-zfs
sudo apt-get install spl-dkms
sudo apt-get install zfs-dkms
sudo apt-get install ubuntu-zfs

I didn't realize that spl needs to be installed before zfs can be compiled successfully and I think I kept getting compile errors based on that fact. The gist, as I understand it, is that the zfs source depends on the spl source.

I found this information on a mailing list.

Related Question