不到半小时前,我用 XFCE 和 trusty 安装了 crouton。然后,我将一些文件从 USB 棒传输到桌面,短暂使用了内置浏览器,并使用 apt-get 安装了大量软件包。我遇到了错误slpd
,我想我可以尝试再次安装它,看看问题出在哪里。
sudo apt-get install slpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
slpd is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 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 slpd (1.2.1-9) ...
+ [ configure = configure ]
+ dpkg --compare-versions le 1.2.1-7.6
+ echo Reinstalling init script for new priorities ...
Reinstalling init script for new priorities ...
+ update-rc.d slpd remove
update-rc.d: /etc/init.d/slpd exists during rc.d purge (use -f to force)
dpkg: error processing package slpd (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
slpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
运行sudo apt-get clean
并没有解决我的问题。这是一个几乎全新的安装。我正在删除所需的程序 slpd,但每次我尝试使用时apt-get install
,都会出现此 dpkg 错误。我该怎么办?
答案1
看起来您受到了所报告的错误的影响发射台。建议的解决方法是打开/var/lib/dpkg/info/slpd.postinst
并编辑它。因此,打开终端并输入:
sudo nano /var/lib/dpkg/info/slpd.postinst
并将其添加-f
到第 9 行,使其变为:
update-rc.d -f slpd remove
保存然后尝试再次安装。