Ubuntu Suomen keskustelualueet
Ubuntun käyttö => Ubuntu tietokoneissa => Aiheen aloitti: mikkok - 18.08.09 - klo:22.33
-
Iltaa!
Olen yrittänyt saada poistettua omasta tuoreen version omaastava ubuntusta apcups-ohjelmaa, mutta
apt-get remove apcupsd kaatuu myös force modessa tähän ilmoitusrimpsuun:
Removing apcupsd ...
/etc/default/apcupsd: 8: UPSCABLE: not found
apcupsd: no process killed
/etc/default/apcupsd: 8: UPSCABLE: not found
invoke-rc.d: initscript apcupsd, action "stop" failed.
dpkg: error processing apcupsd (--remove):
subprocess pre-removal script returned error exit status 127
/etc/default/apcupsd: 8: UPSCABLE: not found
invoke-rc.d: initscript apcupsd, action "start" failed.
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 127
Errors were encountered while processing:
apcupsd
E: Sub-process /usr/bin/dpkg returned an error code (1)
Muina keinoina olen koittanut poistoa myös aptituden voimalla, mutta turhaan. Kaikki apu otetaan kiitollisena vastaan.
-
miltä näyttää /var/lib/dpkg/info/apcupsd.postrm ja/tai prerm
tiedosto?
toisaalta, kokeile ensin asentaa se uusiksi ja sitten poistaa.
-
miltä näyttää /var/lib/dpkg/info/apcupsd.postrm ja/tai prerm
tiedosto?
toisaalta, kokeile ensin asentaa se uusiksi ja sitten poistaa.
Olen kokeillut uudelleen asennusta poiston jälkeen varmistaen ettei apcupsd:n prosesseja pyöri taustalla, mutta asennus jumiutuu tähän:
Setting up apcupsd (3.14.2-1build1) ...
/etc/default/apcupsd: 8: UPSCABLE: not found
invoke-rc.d: initscript apcupsd, action "start" failed.
dpkg: error processing apcupsd (--configure):
subprocess post-installation script returned error exit status 127
Errors were encountered while processing:
apcupsd
E: Sub-process /usr/bin/dpkg returned an error code (1)
/var/lib/dpkg/info/apcupsd.postrm tiedosto näyttää tällä hetkellä tältä:
#!/bin/sh
set -e
if [ -f /usr/share/debconf/confmodule ]
then
. /usr/share/debconf/confmodule
db_version 2.0
db_purge
fi
stop_server ()
{
set +e
if [ -x /usr/sbin/invoke-rc.d ]
then
invoke-rc.d apcupsd stop
else
/etc/init.d/apcupsd stop
fi
errno=$?
set -e
if [ "$?" != 0 ]
then
echo "Trying to stop the apcupsd server resulted in exitcode $?." 1>&2
echo "Stop it yourself and try again!" 1>&2
exit 1
fi
}
case "$1" in
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
stop_server
sleep 2
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# Automatically added by dh_installinit
if [ "$1" = "purge" ] ; then
update-rc.d apcupsd remove >/dev/null || exit $?
fi
# End automatically added section
exit 0
ja /var/lib/dpkg/info/apcupsd.prerm näyttää tältä:
#!/bin/sh
set -e
case "$1" in
remove|upgrade|deconfigure)
[ -x /etc/init.d/apcupsd ] && ( /etc/init.d/apcupsd stop || /usr/bin/killall apcupsd || echo "" >> /dev/null )
if [ -f /etc/cron.daily/apcupsd ]
then
rm -f /etc/cron.daily/apcupsd
fi
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# Automatically added by dh_installinit
if [ -x "/etc/init.d/apcupsd" ] && [ "$1" = remove ]; then
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d apcupsd stop || exit $?
else
/etc/init.d/apcupsd stop || exit $?
fi
fi
# End automatically added section
exit 0
-
Joku nyt mättää, nuo poisto"skriptit" on ihan kunnossa,
toimiiko jos komennat
sudo dpkg-reconfigure apcupsd && sudo aptitude -f install && sudo aptitude purge apcupsd
-
Pahus, ei auttanut tuokaan:
/usr/sbin/dpkg-reconfigure: apcupsd is broken or not fully installed
-
Asennetaan uusiksi ja yritetään poistaa
sudo aptitude reinstall apcupsd && sudo aptitude purge apcupsd
Asennetaan uusiksi konfiguroidaan ja yritetään poistaa
sudo aptitude reinstall apcupsd && sudo dpkg-reconfigure --force apcupsd && sudo aptitude purge apcupsd
-
Edelleen joku hannaa vastaan:
The following packages will be REINSTALLED:
apcupsd
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Setting up apcupsd (3.14.2-1build1) ...
/etc/default/apcupsd: 8: UPSCABLE: not found
invoke-rc.d: initscript apcupsd, action "start" failed.
dpkg: error processing apcupsd (--configure):
subprocess post-installation script returned error exit status 127
Errors were encountered while processing:
apcupsd
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
pelkän aptituden kanssa vääntämisellä antaa apcupsd:n erikoisesti aaltosulkeilla:
The following packages will be REMOVED:
apcupsd{p}