自动更新让我可以选择更新一些软件包。我尝试这样做,但下载软件包后出现错误。
输出为:
installArchives() failed: Preconfiguring packages ...
cp: cannot stat `/usr/share/doc/bandwidthd/bandwidthd.conf': No such file or directory
bandwidthd failed to preconfigure, with exit status 1
Preconfiguring packages ...
cp: cannot stat `/usr/share/doc/bandwidthd/bandwidthd.conf': No such file or directory
bandwidthd failed to preconfigure, with exit status 1
(Reading database ...
(Reading database ... 5%
...
(Reading database ... 100%
(Reading database ...
303040 files and directories currently installed.)
Preparing to replace bandwidthd 2.0.1 (using .../bandwidthd_2.0.1+cvs20090917-4_i386.deb) ...
/etc/init.d/bandwidthd: 19: Syntax error: "("
unexpected invoke-rc.d: initscript bandwidthd, action "stop" failed.
dpkg: warning: subprocess old pre-removal script returned error exit status 2
dpkg - trying script from the new package instead ...
/etc/init.d/bandwidthd: 19: Syntax error: "(" unexpected
invoke-rc.d: initscript bandwidthd, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/bandwidthd_2.0.1+cvs20090917-4_i386.deb
(--unpack):
subprocess new pre-removal script returned error exit status 2 No apport report written because MaxReports is reached already
update-rc.d: warning: /etc/init.d/bandwidthd missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
/etc/init.d/bandwidthd: 19: Syntax error: "(" unexpected
invoke-rc.d: initscript bandwidthd, action "start" failed.
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing: /var/cache/apt/archives/bandwidthd_2.0.1+cvs20090917-4_i386.deb
dpkg: error processing bandwidthd (--configure):
Package is in a very bad inconsistent state - you should reinstall it before attempting configuration.
编辑:
sudo dpkg --purge --force-all bandwidthd
给出:
dpkg: warning: overriding problem because --force enabled:
Package is in a very bad inconsistent state - you should reinstall it before
attempting a removal.
(Reading database ... 303039 files and directories currently installed.)
Removing bandwidthd ...
/etc/init.d/bandwidthd: 19: Syntax error: "(" unexpected
invoke-rc.d: initscript bandwidthd, action "stop" failed.
dpkg: error processing bandwidthd (--purge):
subprocess installed pre-removal script returned error exit status 2
update-rc.d: warning: /etc/init.d/bandwidthd missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
/etc/init.d/bandwidthd: 19: Syntax error: "(" unexpected
invoke-rc.d: initscript bandwidthd, action "start" failed.
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
bandwidthd
编辑2:
sudo dpkg-reconfigure bandwidthd --force
给出:
update-rc.d: warning: /etc/init.d/bandwidthd missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
/etc/init.d/bandwidthd: 19: Syntax error: "(" unexpected
invoke-rc.d: initscript bandwidthd, action "start" failed.
答案1
尝试这个:
sudo mv /var/lib/dpkg/info/bandwidthd.prerm ~/bandwidthd.prerm
sudo dpkg-reconfigure bandwidthd --force
sudo dpkg --purge --force-all bandwidthd