LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem with apt-get (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-apt-get-143292/)

mvp 02-07-2004 07:28 AM

problem with apt-get
 
hello.

everytime i run apt-get and it starts to install some program, i get an error like this:

Unpacking replacement libattr1 ...
Errors were encountered while processing:
/var/cache/apt/archives/courier-authdaemon_0.42.2-11_i386.deb

any idea how i can fix this, its very annoying, since i cant get any think installed :/

m_yates 02-07-2004 11:48 AM

You can try:

dpkg --force overwrite -i /var/cache/apt/archives/courier-authdaemon_0.42.2-11_i386.deb
apt-get -f install

mvp 02-07-2004 01:00 PM

thanks, none of them seem to work though. i just get the same error message

mvp 02-08-2004 08:05 AM

hm i tried to remove it with apt-get --remove, but that didn't work either, i also tried to reinstall it as apt-get suggested but didn't help either.

anyone any suggestions?

m_yates 02-08-2004 10:34 AM

You could try:

dpkg -P /var/cache/apt/archives/courier-authdaemon_0.42.2-11_i386.deb
apt-get clean
apt-get update
apt-get install courier-authdaemon

It is odd that the package could not be removed. I don't know if I have ever had a similar problem.

m_yates 02-08-2004 10:38 AM

Sorry, the first line above should be the package name:

dpkg -P courier-authdaemon

mvp 02-09-2004 02:45 AM

thanks again, got an error message this time as well though.

Package is in a very bad inconsistent state - you should
reinstall it before attempting a removal.

and those two options o have tried with apt-get

HappyTux 02-09-2004 04:05 AM

Try apt-get -f install --reinstall courier-authdaemon and it would be nice to see the entire output if it fails.

mvp 02-09-2004 12:16 PM

unfortunetly it didn't. the output is prett large, so i'm sorry if i am spammiong a bit here.

debian:~# apt-get -f install --reinstall courier-authdaemon
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be upgraded:
courier-authdaemon
1 upgraded, 0 newly installed, 0 to remove and 87 not upgraded.
202 not fully installed or removed.
Need to get 0B/48.2kB of archives.
After unpacking 0B of additional disk space will be used.
Selecting previously deselected package courier-authdaemon.
(Reading database ... 96140 files and directories currently installed.)
Preparing to replace courier-authdaemon 0.42.2-10 (using .../courier-authdaemon_
0.42.2-11_i386.deb) ...
Stopping Courier authdaemon: /usr/lib/courier/authlib/authdaemond: line 22: /etc
/courier/authdaemonrc: No such file or directory
invoke-rc.d: initscript courier-authdaemon, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Stopping Courier authdaemon: /usr/lib/courier/authlib/authdaemond: line 22: /etc
/courier/authdaemonrc: No such file or directory
invoke-rc.d: initscript courier-authdaemon, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/courier-authdaemon_0.42.2-11_i386
.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Starting Courier authdaemon: /usr/lib/courier/authlib/authdaemond: line 22: /etc
/courier/authdaemonrc: No such file or directory
invoke-rc.d: initscript courier-authdaemon, action "start" failed.
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/courier-authdaemon_0.42.2-11_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

HappyTux 02-09-2004 12:49 PM

It looks like it is a bug although that report is pretty old can I see the contents of the /etc/init.d/courier-authdaemon file so I can compare it to the suggested patch.

mvp 02-10-2004 03:54 AM

Here you go:



#! /bin/sh -e

prefix="/usr"
exec_prefix=${prefix}
sysconfdir="/etc/courier"
sbindir="${exec_prefix}/sbin"
libexecdir="${prefix}/lib/courier"

case "$1" in
start)
# Start daemons.
cd /
if test -x ${libexecdir}/authlib/authdaemond
then
echo -n "Starting Courier authdaemon: "
${libexecdir}/authlib/authdaemond start
echo "done."
fi
;;
stop)
# Stop daemons.
cd /
if test -x ${libexecdir}/authlib/authdaemond
then
echo -n "Stopping Courier authdaemon: "
${libexecdir}/authlib/authdaemond stop
echo "done."
fi
;;
restart | reload | force-reload)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac
exit 0

HappyTux 02-10-2004 07:36 AM

All right it looks like you have to edit the file as root and remove the -e from the end of the #/bin/sh -e and try to reinstall.

mvp 02-10-2004 03:15 PM

yay! thanks a lot man, that worked. Now my system is up to date again :)


All times are GMT -5. The time now is 08:38 AM.