FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 08-19-2012, 12:43 AM
"Rodney D. Myers"
 
Default having a problem removing a package

I'm having trouble installing/removing a program "bandwidthd". It's now
in a weird state of not being installed or being able to remove.

i've tried to upgrade to get it installed, and I get this;

sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
bandwidthd
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/79.3 kB of archives.
After this operation, 77.8 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Reading changelogs... Done
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 ... 190526 files and directories currently installed.)
Preparing to replace bandwidthd 2.0.1 (using
.../bandwidthd_2.0.1+cvs20090917-4.1_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.1_i386.deb
(--unpack):
subprocess new pre-removal script returned error exit status 2
configured to not write apport reports
insserv: warning: script
'K01bitmeterweb' missing LSB tags and overrides
insserv: warning: script 'K01bitmeter' missing LSB tags and overrides
insserv: warning: script 'K01bandwidthd' missing LSB tags and overrides
insserv: warning: script 'bandwidthd' missing LSB tags and overrides
insserv: warning: script 'bitmeter' missing LSB tags and overrides
insserv: warning: script 'bitmeterweb' missing LSB tags and overrides
/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.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


How can I get this program uninstalled?

Thanks

--
Rodney D. Myers <rod_dmyers@fastmail.fm>
AIM#: YAHOO:
mailman452 mailman42_5

They that can give up essential liberty to obtain a
little temporary safety deserve neither liberty nor safety.
Ben Franklin - 1759
 
Old 08-19-2012, 12:56 AM
Sven Hartge
 
Default having a problem removing a package

Rodney D. Myers <rod_myers@fastmail.fm> wrote:

> /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.1_i386.deb
> E: Sub-process /usr/bin/dpkg returned an error code (1)

> How can I get this program uninstalled?

Easiest thing you can do is to edit the failing init script and replace
its contents with a simple

#!/bin/sh
exit 0

and then try to remove the package again. This new "init" script will
exit with a positive exit code and dpkg will be happy to remove the
package.

Gre,
Sven.

--
Sigmentation fault. Core dumped.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: h91s2c6ktv8@mids.svenhartge.de">http://lists.debian.org/h91s2c6ktv8@mids.svenhartge.de
 
Old 08-19-2012, 01:01 AM
"Rodney D. Myers"
 
Default having a problem removing a package

On 8/18/12 8:56 PM, Sven Hartge wrote:
> Rodney D. Myers <rod_myers@fastmail.fm> wrote:
>
>> > /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.1_i386.deb
>> > E: Sub-process /usr/bin/dpkg returned an error code (1)
>> > How can I get this program uninstalled?
> Easiest thing you can do is to edit the failing init script and replace
> its contents with a simple
>
> #!/bin/sh
> exit 0
>
> and then try to remove the package again. This new "init" script will
> exit with a positive exit code and dpkg will be happy to remove the
> package.
>
> Gre,
> Sven.

Dumb question.

Where is the script located? in the *.deb package

--
Rodney D. Myers <rod_dmyers@fastmail.fm>
AIM#: YAHOO:
mailman452 mailman42_5

They that can give up essential liberty to obtain a
little temporary safety deserve neither liberty nor safety.
Ben Franklin - 1759
 
Old 08-19-2012, 01:13 AM
Sven Hartge
 
Default having a problem removing a package

Rodney D. Myers <rod_myers@fastmail.fm> wrote:
> On 8/18/12 8:56 PM, Sven Hartge wrote:
>> Rodney D. Myers <rod_myers@fastmail.fm> wrote:

>>> > /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.1_i386.deb
>>> > E: Sub-process /usr/bin/dpkg returned an error code (1)
>>> > How can I get this program uninstalled?

>> Easiest thing you can do is to edit the failing init script and replace
>> its contents with a simple
>>
>> #!/bin/sh
>> exit 0
>>
>> and then try to remove the package again. This new "init" script will
>> exit with a positive exit code and dpkg will be happy to remove the
>> package.

> Dumb question.

> Where is the script located? in the *.deb package

The path failing script is referenced in the error message:

/etc/init.d/bandwidthd: 19: Syntax error: "(" unexpected

You can either fix the script or, as you are removing the package
anyway, just make it exit 0 and be done with this.

Gre,
Sven.

--
Sigmentation fault. Core dumped.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: i91s3ahktv8@mids.svenhartge.de">http://lists.debian.org/i91s3ahktv8@mids.svenhartge.de
 
Old 08-19-2012, 01:23 AM
John Hasler
 
Default having a problem removing a package

Rodney writes:
> How can I get this program uninstalled?

First do

sudo killall bandwidthd

to make sure the daemon isn't running. Then edit /etc/init.d/bandwidthd
and add the line

exit 0

immediately after the first line (which should be #!/bin/sh). Then
remove and purge the package.
--
John Hasler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87fw7jn08m.fsf@thumper.dhh.gt.org">http://lists.debian.org/87fw7jn08m.fsf@thumper.dhh.gt.org
 
Old 08-19-2012, 01:28 AM
Chris Bannister
 
Default having a problem removing a package

On Sat, Aug 18, 2012 at 08:43:40PM -0400, Rodney D. Myers wrote:
> I'm having trouble installing/removing a program "bandwidthd". It's now
> in a weird state of not being installed or being able to remove.
>
> i've tried to upgrade to get it installed, and I get this;
>
> sudo apt-get upgrade
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> The following packages will be upgraded:
> bandwidthd
> 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> 2 not fully installed or removed.

Ok, first I'd do an "apt-get clean"
Then I'd do an "apt-get update"
Then I'd do an "apt-get upgrade"
again just to see if the errors were still there.

If so, I'd probably do an "apt-get dist-upgrade" just to see what it
wanted to do. You could use the "-s" switch just to simulate the
actions.

Depending if it was going to correct itself or dig a deeper hole ...

Then I'd either use one of the force options of dpkg, and try and purge
the existing package, or edit the problem script and put "exit 0" at the
beginning of the script and try again.



> Preparing to replace bandwidthd 2.0.1 (using
> .../bandwidthd_2.0.1+cvs20090917-4.1_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.1_i386.deb
> (--unpack):
> subprocess new pre-removal script returned error exit status 2
> configured to not write apport reports
> insserv: warning: script
> 'K01bitmeterweb' missing LSB tags and overrides
> insserv: warning: script 'K01bitmeter' missing LSB tags and overrides
> insserv: warning: script 'K01bandwidthd' missing LSB tags and overrides
> insserv: warning: script 'bandwidthd' missing LSB tags and overrides
> insserv: warning: script 'bitmeter' missing LSB tags and overrides
> insserv: warning: script 'bitmeterweb' missing LSB tags and overrides
> /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.1_i386.deb
> E: Sub-process /usr/bin/dpkg returned an error code (1)

Has a google search given any help here?
Have you checked the BTS?

> How can I get this program uninstalled?

See above regarding forcing dpkg or editing the problem script,
either way I'd probably drop the maintainer a note, depending if there
was no fix from Google, or the BTS.

--
"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the
oppressing." --- Malcolm X


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120819012838.GA20471@tal
 
Old 08-19-2012, 09:10 AM
Andrei POPESCU
 
Default having a problem removing a package

On Du, 19 aug 12, 13:28:38, Chris Bannister wrote:
>
> Ok, first I'd do an "apt-get clean"

Why would you delete the downloaded packages cache because a package
fails to remove/purge?

Kind regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
 
Old 08-19-2012, 11:16 AM
Chris Bannister
 
Default having a problem removing a package

On Sun, Aug 19, 2012 at 12:10:46PM +0300, Andrei POPESCU wrote:
> On Du, 19 aug 12, 13:28:38, Chris Bannister wrote:
> >
> > Ok, first I'd do an "apt-get clean"
>
> Why would you delete the downloaded packages cache because a package
> fails to remove/purge?

When I saw this:
> 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

I thought just to be on the safe side it might be a good idea to clean
out any old cruft. And considering everything seemed to be uptodate
except for 2 packages I presumed there would be no harm done.

Why keep old ones around anyway?

--
"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the
oppressing." --- Malcolm X


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120819111628.GA22364@tal
 
Old 08-19-2012, 12:37 PM
Keith McKenzie
 
Default having a problem removing a package

On 19 August 2012 12:16, Chris Bannister <cbannister@slingshot.co.nz> wrote:
> On Sun, Aug 19, 2012 at 12:10:46PM +0300, Andrei POPESCU wrote:
>> On Du, 19 aug 12, 13:28:38, Chris Bannister wrote:
>> >
>> > Ok, first I'd do an "apt-get clean"
>>
>> Why would you delete the downloaded packages cache because a package
>> fails to remove/purge?
>
> When I saw this:
>> 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
>
> I thought just to be on the safe side it might be a good idea to clean
> out any old cruft. And considering everything seemed to be uptodate
> except for 2 packages I presumed there would be no harm done.
>
> Why keep old ones around anyway?
>

I keep the cache files to save downloading again & for use on other
machines, If I want to clear my cache, I will copy them somewhere
else.

(Just my take on "why keep old ones around anyway")

--
Sent from FOSS (Free Open Source Software)
Debian GNU/Linux


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAL36VGk-RHJCX_w++2Cq1uCkyFEq_vX7Or0J1zbjWtq2JozSog@mail.gm ail.com">http://lists.debian.org/CAL36VGk-RHJCX_w++2Cq1uCkyFEq_vX7Or0J1zbjWtq2JozSog@mail.gm ail.com
 
Old 08-19-2012, 05:04 PM
Andrei POPESCU
 
Default having a problem removing a package

On Du, 19 aug 12, 23:16:28, Chris Bannister wrote:
>
> When I saw this:
> > 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
>
> I thought just to be on the safe side it might be a good idea to clean
> out any old cruft. And considering everything seemed to be uptodate
> except for 2 packages I presumed there would be no harm done.

As far as I know apt (and dpkg?) have rigorous integrity checks for the
debs.

> Why keep old ones around anyway?

A sort of backup in case you need to install packages "by hand" (i.e.
with dpkg -i). There is of course snapshot.d.o, but if the package you
need is also involved in running the internet connection things get more
difficult

Kind regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
 

Thread Tools




All times are GMT. The time now is 02:41 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org