LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   howto get rid of a broken program (https://www.linuxquestions.org/questions/linux-newbie-8/howto-get-rid-of-a-broken-program-783190/)

johnh10000 01-19-2010 05:57 AM

howto get rid of a broken program
 
Ok I should know how to do this, but. Using Ubuntu Jaunty. I have tried using dpkg --purge no joy :(

Code:

root@tux:~/ftp/pub/linux/multimedia/dj/campcaster# /usr/share/mc/extfs/deb run /root/ftp/pub/linux/multimedia/dj/campcaster/campcaster-station_1.4.0-3beta3_i386.deb INSTALL
Installing /root/ftp/pub/linux/multimedia/dj/campcaster/campcaster-station_1.4.0-3beta3_i386.deb
Selecting previously deselected package campcaster-station.
(Reading database ... 241533 files and directories currently installed.)
Preparing to replace campcaster-station 1.4.0-3beta3 (using .../campcaster-station_1.4.0-3beta3_i386.deb) ...
no postgresql 8.1, 8.2 or 8.3 found
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
no postgresql 8.1, 8.2 or 8.3 found
dpkg: error processing /root/ftp/pub/linux/multimedia/dj/campcaster/campcaster-station_1.4.0-3beta3_i386.deb (--install):
 subprocess new pre-removal script returned error exit status 1
no postgresql 8.1, 8.2 or 8.3 found
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 /root/ftp/pub/linux/multimedia/dj/campcaster/campcaster-station_1.4.0-3beta3_i386.deb

root@tux:~/ftp/pub/linux/multimedia/dj/campcaster# dpkg  campcaster-studio --configure~
dpkg: need an action option

Type dpkg --help for help about installing and deinstalling packages[*];
Use `dselect' or `aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
Type dpkg --license|--licence for copyright licence and lack of warranty (GNU GPL)[*].

Options marked[*] produce a lot of output - pipe it through `less' or `more' !
root@tux:~/ftp/pub/linux/multimedia/dj/campcaster#
root@tux:~#
root@tux:~# dpkg --purge campcaster-station
dpkg: error processing campcaster-station (--purge):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 campcaster-station
root@tux:~#


evo2 01-19-2010 07:28 AM

The long answer is to try to debug post-install and/or pre-remove scripts which can be found in /var/lib/dpkg/info.
Eg. campcaster-studio.prerm and campcaster-studio.postinst

The quick and dirty option is:
Code:

dpkg --purge --force-remove-reinstreq campcaster-studio
Use at your own risk.

Evo2.

PS. Nine times out of ten these problems happen because of very badly made packages. Where did you get this one from?

cola 01-19-2010 07:49 AM

Quote:

Originally Posted by johnh10000 (Post 3831966)
Ok I should know how to do this, but. Using Ubuntu Jaunty. I have tried using dpkg --purge no joy :(

Code:

root@tux:~/ftp/pub/linux/multimedia/dj/campcaster# /usr/share/mc/extfs/deb run /root/ftp/pub/linux/multimedia/dj/campcaster/campcaster-station_1.4.0-3beta3_i386.deb INSTALL
Installing /root/ftp/pub/linux/multimedia/dj/campcaster/campcaster-station_1.4.0-3beta3_i386.deb
Selecting previously deselected package campcaster-station.
(Reading database ... 241533 files and directories currently installed.)
Preparing to replace campcaster-station 1.4.0-3beta3 (using .../campcaster-station_1.4.0-3beta3_i386.deb) ...
no postgresql 8.1, 8.2 or 8.3 found
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
no postgresql 8.1, 8.2 or 8.3 found
dpkg: error processing /root/ftp/pub/linux/multimedia/dj/campcaster/campcaster-station_1.4.0-3beta3_i386.deb (--install):
 subprocess new pre-removal script returned error exit status 1
no postgresql 8.1, 8.2 or 8.3 found
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 /root/ftp/pub/linux/multimedia/dj/campcaster/campcaster-station_1.4.0-3beta3_i386.deb

root@tux:~/ftp/pub/linux/multimedia/dj/campcaster# dpkg  campcaster-studio --configure~
dpkg: need an action option

Type dpkg --help for help about installing and deinstalling packages[*];
Use `dselect' or `aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
Type dpkg --license|--licence for copyright licence and lack of warranty (GNU GPL)[*].

Options marked[*] produce a lot of output - pipe it through `less' or `more' !
root@tux:~/ftp/pub/linux/multimedia/dj/campcaster#
root@tux:~#
root@tux:~# dpkg --purge campcaster-station
dpkg: error processing campcaster-station (--purge):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 campcaster-station
root@tux:~#


Is it solved?

johnh10000 01-19-2010 12:32 PM

Quote:

Originally Posted by cola (Post 3832051)
Is it solved?

no, i've been at the dentist

johnh10000 01-19-2010 06:07 PM

Quote:

Originally Posted by evo2 (Post 3832029)
The long answer is to try to debug post-install and/or pre-remove scripts which can be found in /var/lib/dpkg/info.
Eg. campcaster-studio.prerm and campcaster-studio.postinst

The quick and dirty option is:
Code:

dpkg --purge --force-remove-reinstreq campcaster-studio

well that tried, but failed
Code:

root@tux:~# dpkg --purge --force-remove-reinstreq campcaster-libs
(Reading database ... 241381 files and directories currently installed.)
Removing campcaster-libs ...
Purging configuration files for campcaster-libs ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
root@tux:~# dpkg --purge --force-remove-reinstreq campcaster-station
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 ... 241038 files and directories currently installed.)
Removing campcaster-station ...
no postgresql 8.1, 8.2 or 8.3 found
dpkg: error processing campcaster-station (--purge):
 subprocess pre-removal script returned error exit status 1
no postgresql 8.1, 8.2 or 8.3 found
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 campcaster-station
root@tux:~#

Quote:

PS. Nine times out of ten these problems happen because of very badly made packages. Where did you get this one from?
campcaster.org :( i have never had it working. its going after this mess.

oh can give me clues as to how debug the scripts in .../info

evo2 01-19-2010 06:39 PM

It seems to be failing because postresql is not installed. It is probably trying to clean up tables that it may have made inside the db, and bailing out when it can't.

If is a shell script, put "set -x" near the top line of the postrm script. Then run "dpkg --purge --force-remove-reinstreq campcaster-station" again.

This will make the script echo every line to the terminal, from that you should be able to work out where the problem is.

If you really can't work out what is going on, you can put "exit 0" near the top of the script to force it to exit cleanly. However in this case, whatever cleanup tasks the script was trying to perform will not be done.

EVo2.

johnh10000 01-19-2010 07:16 PM

Quote:

Originally Posted by evo2 (Post 3832734)
It seems to be failing because postresql is not installed. It is probably trying to clean up tables that it may have made inside the db, and bailing out when it can't.

If is a shell script, put "set -x" near the top line of the postrm script. Then run "dpkg --purge --force-remove-reinstreq campcaster-station" again.

This will make the script echo every line to the terminal, from that you should be able to work out where the problem is.

If you really can't work out what is going on, you can put "exit 0" near the top of the script to force it to exit cleanly. However in this case, whatever cleanup tasks the script was trying to perform will not be done.

EVo2.

Thanks alot, after putting exit 0 at top all of the camcaster scripts in there, it finally went. ok I got put postgresql-8.4 back on for something else....

You taught me something!! Cheers your thumbs up/thanks is comming after this post.


All times are GMT -5. The time now is 08:39 PM.