Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Automatic update gives me option to update some packages. I tried to do this, but after downloading packages it gives me error.

Output is:

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.

Edit:

sudo dpkg --purge --force-all bandwidthd

gives:

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

EDIT2:

sudo dpkg-reconfigure bandwidthd --force

gives:

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.
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Try this:

sudo mv /var/lib/dpkg/info/bandwidthd.prerm ~/bandwidthd.prerm

sudo dpkg-reconfigure bandwidthd --force

sudo dpkg --purge --force-all bandwidthd

share|improve this answer
    
no it didn't helped. I've got errors on first command. –  Иван Бишевац Oct 1 '11 at 20:42
    
can you give an output? –  Bruno Pereira Oct 1 '11 at 22:18
    
I pasted output in main question. –  Иван Бишевац Oct 2 '11 at 14:24
    
Edited answer to for a reconfig and removal of the package. –  Bruno Pereira Oct 2 '11 at 16:29
    
it gives errors again. See my edit2. –  Иван Бишевац Oct 3 '11 at 15:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.