我对 Linux 不是很熟悉。我只使用 Ubuntu 几个月。最近,每当我尝试执行任何任务(主要是 apt-get 任务)时,我都会遇到同样的错误。例如,在这里我尝试安装 htop 以达到我的目的,这是我收到的错误。似乎错误是由于 rsync 而发生的,但不确定错误是什么,也不知道该如何消除它。
sudo apt-get install htop
Reading package lists... Done
Building dependency tree
Reading state information... Done
htop is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
1 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 rsync (3.1.1-3ubuntu0.15.04.1) ...
insserv: warning: script 'K01vpnagentd_init' missing LSB tags and overrides
insserv: warning: script 'vpnagentd_init' missing LSB tags and overrides
insserv: Starting vpnagentd_init depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting vpnagentd_init depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting vpnagentd_init depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service vpnagentd_init and rc.local if started
insserv: loop involving service rc.local at depth 7
insserv: loop involving service vpnagentd_init at depth 1
insserv: Starting vpnagentd_init depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package rsync (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
rsync
E: Sub-process /usr/bin/dpkg returned an error code (1)
我也尝试过使用sudo dpkg --configure -a
,但出现以下错误
Setting up rsync (3.1.1-3ubuntu0.15.04.1) ...
insserv: warning: script 'K01vpnagentd_init' missing LSB tags and overrides
insserv: warning: script 'vpnagentd_init' missing LSB tags and overrides
insserv: Starting vpnagentd_init depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting vpnagentd_init depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting vpnagentd_init depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service vpnagentd_init and rc.local if started
insserv: loop involving service rc.local at depth 7
insserv: loop involving service vpnagentd_init at depth 1
insserv: Starting vpnagentd_init depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package rsync (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
rsync
如果有人能指出我应该怎么做才能消除此错误,那将非常有帮助。我正在使用 Ubuntu 15.04。谢谢你的帮助。
答案1
我将删除 rsync,尝试解决与 vpnagentd_init 脚本相关的问题并重新安装 rsync。
1)使用以下方法删除 rsyncsudo apt-get remove rsync
2)编辑/etc/init.d/vpnagentd_init并插入以下LSB标签。
### BEGIN INIT INFO
# Provides: vpnagentd_init
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start Cisco vpn agent daemon at boot time
# Description: Cisco vpn agent daemon (believe installed by company ssl client)
### END INIT INFO
来源:http://forums.debian.net/viewtopic.php?f=30&t=53192#p575807
3)使用以下方式安装 rsyncsudo apt-get install rsync
如果一切顺利,那么您不应该看到任何 vpnagentd_init 警告,并且 rsync 安装后脚本应该可以无错误执行。