无法在 16.04 上安装 zfs 或 zfsutils

无法在 16.04 上安装 zfs 或 zfsutils

我无法在最近升级的 Ubuntu 14.04 到 16.04 上安装 ZFS。我希望升级可以解决我遇到的 zfs 问题,zpoolzfs无法运行。

sudo apt install zfs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'zfsutils-linux' instead of 'zfs'
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.
 zfsutils-linux : Depends: zfs-doc (= 0.6.5.6-0ubuntu16) but 0.6.5.9-1~trusty is to be installed
                  Depends: libnvpair1linux but it is not going to be installed
                  Depends: libuutil1linux but it is not going to be installed
                  Depends: libzfs2linux but it is not going to be installed
                  Depends: libzpool2linux but it is not going to be installed
                  Recommends: zfs-zed but it is not going to be installed
N: Ignoring file '50unattended-upgrades.ucf-old' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
E: Unable to correct problems, you have held broken packages.

我已尝试手动安装列出的依赖项以及apt cleanautoclean

软件更新程序中勾选了社区维护的自由和开源软件(universe)复选框

如果您能提供任何关于如何进一步调试和/或解决此问题的建议,我将不胜感激。我在 SE 和其他地方都发现过类似的报告,但这些建议对我都不起作用。

我还尝试过“尝试从此处下载 zfs-doc。所有其他软件包似乎都依赖于它。您可以通过运行 dpkg -i 来安装它”,但出现以下错误:

 systemctl status zfs-mount.service
● zfs-mount.service - Mount ZFS filesystems
   Loaded: loaded (/lib/systemd/system/zfs-mount.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2017-05-28 11:49:35 BST; 1min 34s ago
  Process: 5358 ExecStart=/sbin/zfs mount -a (code=exited, status=1/FAILURE)
 Main PID: 5358 (code=exited, status=1/FAILURE)

May 28 11:49:35 codecowboy-P5E3-Premium systemd[1]: Starting Mount ZFS filesystems...
May 28 11:49:35 codecowboy-P5E3-Premium zfs[5358]: The ZFS modules are not loaded.
May 28 11:49:35 codecowboy-P5E3-Premium zfs[5358]: Try running '/sbin/modprobe zfs' as root to load them.
May 28 11:49:35 codecowboy-P5E3-Premium systemd[1]: zfs-mount.service: Main process exited, code=exited, status=1/FAILURE
May 28 11:49:35 codecowboy-P5E3-Premium systemd[1]: Failed to start Mount ZFS filesystems.
May 28 11:49:35 codecowboy-P5E3-Premium systemd[1]: zfs-mount.service: Unit entered failed state.
May 28 11:49:35 codecowboy-P5E3-Premium systemd[1]: zfs-mount.service: Failed with result 'exit-code'.
codecowboy@codecowboy-P5E3-Premium:~/Downloads$ sudo sbin/modprobe zfs
sudo: sbin/modprobe: command not found
codecowboy@codecowboy-P5E3-Premium:~/Downloads$ sudo /sbin/modprobe zfs
modprobe: ERROR: could not insert 'zfs': Invalid argument
codecowboy@codecowboy-P5E3-Premium:~/Downloads$ sudo journalctl -xe
May 28 11:49:35 codecowboy-P5E3-Premium systemd[1]: zfs-mount.service: Failed with result 'exit-code'.
May 28 11:49:48 codecowboy-P5E3-Premium sudo[30638]: pam_unix(sudo:session): session closed for user root
May 28 11:50:01 codecowboy-P5E3-Premium cron[1029]: (*system*zfsutils-linux) RELOAD (/etc/cron.d/zfsutils-linux)
May 28 11:51:38 codecowboy-P5E3-Premium sudo[11155]: codecowboy : TTY=pts/1 ; PWD=/home/codecowboy/Downloads ; USER=root ; COMMAND=/sbin/modprobe z
May 28 11:51:38 codecowboy-P5E3-Premium sudo[11155]: pam_unix(sudo:session): session opened for user root by codecowboy(uid=0)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol __cv_init
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol __cv_init (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol vn_close
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol vn_close (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol cv_timedwait_hires
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol cv_timedwait_hires (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol vn_seek
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol vn_seek (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol __cv_destroy
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol __cv_destroy (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol __cv_timedwait_sig
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol __cv_timedwait_sig (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol rootdir
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol rootdir (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol kobj_close_file
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol kobj_close_file (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol kobj_read_file
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol kobj_read_file (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol __kstat_delete
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol __kstat_delete (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol vn_open
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol vn_open (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol kobj_open_file
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol kobj_open_file (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol vn_getf
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol vn_getf (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol kobj_get_filesize
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol kobj_get_filesize (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol vn_fsync
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol vn_fsync (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol __cv_wait
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol __cv_wait (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol vn_getattr
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol vn_getattr (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol __cv_wait_sig
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol __cv_wait_sig (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol __kstat_install
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol __kstat_install (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol __cv_signal
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol __cv_signal (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol vn_rdwr
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol vn_rdwr (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol __cv_wait_io
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol __cv_wait_io (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol __kstat_create
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol __kstat_create (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol __cv_broadcast
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol __cv_broadcast (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol vn_openat
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol vn_openat (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: disagrees about version of symbol __kstat_set_raw_ops
May 28 11:51:38 codecowboy-P5E3-Premium kernel: zfs: Unknown symbol __kstat_set_raw_ops (err -22)
May 28 11:51:38 codecowboy-P5E3-Premium sudo[11155]: pam_unix(sudo:session): session closed for user root
May 28 11:52:00 codecowboy-P5E3-Premium sudo[11159]: codecowboy : TTY=pts/1 ; PWD=/home/codecowboy/Downloads ; USER=root ; COMMAND=/bin/journalctl 
May 28 11:52:00 codecowboy-P5E3-Premium sudo[11159]: pam_unix(sudo:session): session opened for user root by codecowboy(uid=0)

答案1

我从 14.04 升级到 16.04 后遇到了同样的错误:

 zfsutils-linux : Depends: zfs-doc (= 0.6.5.6-0ubuntu16) but 0.6.5.9-1~trusty is to be installed
  1. 我确实apt-get remove zfs-doc删除了所有相关的 zfs 依赖项(所有依赖项都是 0.6.5.9-1~trusty)。
  2. 这样apt-get install zfsutils-linux做之后,问题解决了,但重启后 zfs 模块无法安装(dmsg 显示加载 zfs 模块时出现符号解析错误zfs:对符号 __cv_init 的版本有不同意见
  3. 最后一步是从 dkms 中删除过时的 spl 模块,dkms remove spl/0.6.5.9 -all然后重新启动。我的 zfs 卷已自动再次挂载。

答案2

转到设置(在 Dash 中Software and Updates搜索)。Software and Updates

确保复选框Community-maintained free and open-source software (universe)已被选中。

运行sudo apt update以将所有额外的包添加到您的系统。

尝试再次安装zfs

相关内容