NavigationUser loginLinux NewsClick the above for your daily dose of Linux news. Food for ThoughtLearn from your parent's mistakes -- use birth control! Spam?See spam posts on this site? If so, please don't reply to the spam! Instead, just report the URL to the webmaster. |
apt-get install always fails with "failed to preconfigure, with exit status 1" messageI am having trouble with the apt-get install when attempting to install ANY package. For example:
dev16:~# apt-get install nedit
Reading package lists... Done
Building dependency tree... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
kdm: Depends: kdebase-bin (= 4:3.5.5a.dfsg.1-6etch1) but 4:3.5.5a.dfsg.1-6etch2 is to be installed
nedit: Depends: lesstif2 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
dev16:~#
If I try to run "apt-get -f install" to correct I get the following result. I get pretty much same result if I specify kdm or kdebase-bin as the target:
dev16:~# apt-get -f install
Reading package lists... Done
Building dependency tree... Done
Correcting dependencies... Done
The following extra packages will be installed:
kdm
The following packages will be upgraded:
kdm
1 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
6 not fully installed or removed.
Need to get 0B/637kB of archives.
After unpacking 160kB disk space will be freed.
Do you want to continue [Y/n]? Y
Preconfiguring packages ...
kdm failed to preconfigure, with exit status 1
(Reading database ... 96836 files and directories currently installed.)
Preparing to replace kdm 4:3.5.5a.dfsg.1-6etch1 (using .../kdm_4%3a3.5.5a.dfsg.1-6etch2_i386.deb) ...
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
dpkg: error processing /var/cache/apt/archives/kdm_4%3a3.5.5a.dfsg.1-6etch2_i386.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/kdm_4%3a3.5.5a.dfsg.1-6etch2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
dev16:~#
I do not know how to use dselect to fix dependencies but I stepped through a how-to to have it select default packages to update. It came back with "The following packages will be upgraded: kdm sun-java5-bin sun-java5-jre" but with the same errors resulting when it tries to do the update. I tried running the kdm preconfigure script "/var/lib/dpkg/info/kdm.preinst" and it does return 1 if no argument is specified: dev16:~# /var/lib/dpkg/info/kdm.preinst preinst called with unknown argument `' dev16:~# echo $? 1 dev16:~# I checked the script and it contains the following:
! /bin/sh -e
case "$1" in
upgrade)
rm -f /etc/kde3/debian/kdm-update-menu.sh
rm -f /etc/kde3/debian/kdm.options
rm -f /etc/kde3/kdm/pixmaps/XFree86bw.xpm
rm -f /etc/kde3/kdm/pixmaps/XFree86.xpm
rm -f /etc/kde3/kdm/Xresources
rm -f /etc/menu-methods/kdm
;;
install)
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0
Obviously running it with "upgrade" then returns 0: dev16:~# /var/lib/dpkg/info/kdm.preinst upgrade dev16:~# echo $? 0 dev16:~# I tried modifying the script to assume upgrade just in case it wasn't receiving the parameter, but still get an error during apt-get. I don't know if it is even running the script because if I remove it entirely it still gives me the same error. I'm out of ideas on how to fix this. Does anybody have any suggestions as to what I might try or what is causing this error? |
Re: apt-get install always fails with "failed to preconfigure, w
Have you done an "apt-get update"? It looks like you have Etch repositories + some Etch updates but maybe not all of them. After the "apt-get update", try "apt-get upgrade".
If there are still problems and you know your repository is good, then you have other package problems and need to find out why the Etch packages are in a bad state. Make sure the security site for Etch is in your repository list (/etc/apt/sources.lst).
Re: apt-get install always fails with "failed to preconfigure, w
Thanks for your reply.
Yes, I definitely did run "apt-get update" before running any of these commands. I also believe I have the security site for Etch, but I don't know if it is correctly entered.
This is what is currently in my sources.lst file:
Are there any conflicts in there? Should I also add the security "stable/updates"?