Windows 10 Linux子系统下的Ubuntu

Windows 10 Linux子系统下的Ubuntu

大家好,我是 Ubuntu 新手。我尝试在 Windows Linux 子系统下安装 Ubuntu 18.04。

我要先安装一步libdvd-pkg,但出现如下所示的错误:

sudo apt-get install libdvd-pkg
[sudo] password for xyz:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libdvd-pkg is already the newest version (1.4.2-1-1).
libdvd-pkg set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
7 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up libdvd-pkg (1.4.2-1-1) ...
libdvd-pkg: Checking orig.tar integrity...
/usr/src/libdvd-pkg/libdvdcss_1.4.2.orig.tar.bz2: OK
libdvd-pkg: Unpacking and configuring...
libdvd-pkg: Building the package... (it may take a while)
libdvd-pkg: Build log will be saved to /usr/src/libdvd-pkg/libdvdcss2_1.4.2-1~local_amd64.build
failed to set securebits to 024/0x14
dpkg: error processing package libdvd-pkg (--configure):
 installed libdvd-pkg package post-installation script subprocess returned error exit status 1
Setting up ruby-molinillo (0.6.4-1) ...
dpkg: unrecoverable fatal error, aborting:
 unable to install updated status of 'ruby-molinillo': No such file or directory
libdvd-pkg: Checking orig.tar integrity...
/usr/src/libdvd-pkg/libdvdcss_1.4.2.orig.tar.bz2: OK
libdvd-pkg: Unpacking and configuring...
libdvd-pkg: Building the package... (it may take a while)
libdvd-pkg: Build log will be saved to /usr/src/libdvd-pkg/libdvdcss2_1.4.2-1~local_amd64.build
failed to set securebits to 024/0x14
E: Sub-process /usr/bin/dpkg returned an error code (2)

有谁可以解释一下这个吗?

答案1

我尝试找出capsh设置失败的原因,但没有成功。无论如何,当由非超级用户运行securebits时,该错误是相同的。capsh

作为解决方法,您可以:

  1. 修改该脚本以使用 来bash代替/usr/lib/libdvd-pkg/b-i_libdvdcss.sh由 调用的脚本postinst。更改此行:

    CAPSH="$(which capsh) --secbits=0x14 --drop=cap_dac_read_search,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog-ep --print --" || CAPSH=/bin/bash
    

    到:

    CAPSH=/bin/bash
    
  2. 然后修复APT

    sudo apt install -f
    

我还看到它可以与 WSL2(VM)很好地兼容。错误报告:github.com/microsoft/WSL/issues/4278

相关内容