Vivid - 在 systemd 安装中使用 upstart 时出现损坏的软件包

Vivid - 在 systemd 安装中使用 upstart 时出现损坏的软件包

我尝试通过这个 PPA 来让 dnscrypt-proxy 工作: https://launchpad.net/~anton+/+archive/ubuntu/dnscrypt

编辑:这个 PPA 已经过时了,正确的方法是 https://launchpad.net/~xuzhen666/+archive/ubuntu/dnscrypt

安装后,它抱怨 upstart 不可用。

➜  ~  sudo apt-get -f install
Setting up dnscrypt-proxy (1.6.0-3pmo1~vivid) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
insserv: warning: script 'dnscrypt-proxy' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `dnscrypt-proxy'
insserv: Default-Stop  undefined, assuming empty stop  runlevel(s) for script `dnscrypt-proxy'
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
Failed to restart dnscrypt-proxy.service: Unit dnscrypt-proxy.service failed to load: Invalid argument. See system logs and 'systemctl status dnscrypt-proxy.service' for details.
invoke-rc.d: initscript dnscrypt-proxy, action "restart" failed.
dpkg: error processing package dnscrypt-proxy (--configure):
 subprocess installed post-installation script returned error exit status 6
Errors were encountered while processing:
 dnscrypt-proxy
E: Sub-process /usr/bin/dpkg returned an error code (1)

如果不需要,我宁愿不切换回 upstart。我是否必须等待软件包维护者更新 systemd 软件包?

我无法使用 dpkg 或 apt-get 删除该包,因为它尝试关闭服务并因类似的错误而失败。

Removing dnscrypt-proxy (1.6.0-3pmo1~vivid) ...
Failed to stop dnscrypt-proxy.service: Unit dnscrypt-proxy.service not loaded.
invoke-rc.d: initscript dnscrypt-proxy, action "stop" failed.
dpkg: error processing package dnscrypt-proxy (--remove):
subprocess installed pre-removal script returned error exit status 5
...

运行上面错误日志中显示的命令:

~ systemctl status dnscrypt-proxy.service
dnscrypt-proxy.service - DNSCrypt proxy
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
 Docs: man:dnscrypt-proxy(8)
systemd[1]: dnscrypt-proxy.service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.

答案1

似乎是一个错误,你应该询问开发人员。同时删除该包。

  1. 检查文件/var/lib/dpkg/info/dnscrypt-proxy.prerm、预删除脚本并搜索停止服务的命令,例如service … stop。注释掉这些行并重试。我稍后会在家里检查这一点,以便给出更好的解释。

  2. sudo apt-get purge dnscrypt-proxy

答案2

你可以尝试这个:

sudo apt-get install linux-efi-amd64_ linux-efi
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install -f
sudo apt-get install linux-efi

然后是这个:

sudo -i
mkdir /com/upstart
sudo nano /com/upstart/upstart

然后写下:

[default]
plymouth-upstart-bridge=default

这样也许能很好地发挥作用。

相关内容