Ubuntu 15.04 安装 xboxdrv 时出现 xboxdrv.service 错误

Ubuntu 15.04 安装 xboxdrv 时出现 xboxdrv.service 错误

我曾多次尝试在 Ubuntu 15.04 64 位上安装用于控制器 xbox360 的驱动程序,执行以下命令后总是出现相同的错误:

sudo apt-add-repository -y ppa:rael-gc/ubuntu-xboxdrv
sudo apt-get update
sudo apt-get install ubuntu-xboxdrv
...

Configuring the ubuntu-xboxdrv package (20150319-1) ...
/usr/bin/update-desktop-database
Failed to start xboxdrv.service: Unit xboxdrv.service failed to load: No such file or directory.
dpkg: error processing ubuntu-xboxdrv (--configure) package:
  subprocess installed post-installation script returned error code 6
Configuring the evtest package (1: 1.32-1) ...
Configuring the joystick package (1: 1.4.7-2) ...
Parsing libc-bin (2.21-0ubuntu4) triggers ...
Processing ureadahead (0.100.0-19) triggers ...
Processing dbus packet triggers (1.8.12-1ubuntu5) ...
There were errors while processing:
  ubuntu-xboxdrv
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

尝试以下操作(在上述安装尝试之后 - 安装失败时)。它解决了我在安装 ubuntu-xboxdrv 时遇到的相同问题:

  1. https://github.com/raelgc/ubuntu_xboxdrv/tree/master/src/lib/systemd/system,右键单击 xboxdrv.service 并选择“将链接内容另存为”或“将目标另存为”,并将其保存为“xboxdrv.service”到易于访问的路径中。

  2. 打开终端并导航到 xboxdrv.service 所在的上述路径并运行以下命令:

    sudo systemctl enable xboxdrv.service

  3. 然后再次运行sudo apt-get install ubuntu-xboxdrv

这应该可以解决问题。

信用: https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units

相关内容