I remember back in '00 when Daniel Free wrote: > I Just reinstalled my machine at home with debian 2.2 (potato) and started > apt-get installing all the things i likeon my system, but when i got to ssh > it returned the error below. > > #### Begin Console Dump #### > > 1 packages not fully installed or removed. > Need to get 0B of archives. After unpacking 0B will be used. > Setting up ssh (1.2.3-5) ... > dpkg: error processing ssh (--configure): > subprocess post-installation script returned error exit status 10 > Errors were encountered while processing: > ssh > E: Sub-process /usr/bin/dpkg returned an error code (1) > > #### End Console Dump #### > > the program itself has installed correctly and works however whenever i use > apt-get it finishes with the above error. > > any suggestions ??
I had the same problem installing ssh on one of my stripped down machines that hadn't been updated for a few months. There are a couple of problems that my unexpert eyes found in the /var/lib/dpkg/info/ssh.postinst script... 1) Apparently it tries to grab values from debconf that aren't defined and this results in your error 10 being propgated up in the script 2) at the end there is db_stop command that just doesn't seem exist. In another thread someone mentioned that this needs to be wrapped in some sort of test.. I just hacked the script around to get it to stop complaining. I attached the script that at least allowed me to get past the annoying error. As far as I can tell what I did is make ssh emulate the behavior when debconf isn't installed. It may format your drive or send a copy of all your emails to fbi.gov for all I know.. Hope this helps? Matt -- /* Matt Sayler || [EMAIL PROTECTED] || http://www.thewalrus.org "RFC 882 put the dot in .com" -- Christian Bauernfeind */
#!/bin/sh -e action="$1" oldversion="$2" if [ "$action" = configure ] then if [ -f /etc/ssh/ssh_host_key ] then #check for old host_key files using IDEA, which openssh does not support ssh-keygen -p -N '' -f /etc/ssh/ssh_host_key 2>&1 | \ grep -q 'unknown cipher' && { mv /etc/ssh/ssh_host_key /etc/ssh/ssh_host_key.old mv /etc/ssh/ssh_host_key.pub /etc/ssh/ssh_host_key.pub.old } fi [ -f /etc/ssh/ssh_host_key ] || ( umask 022 ssh-keygen -b 1024 -f /etc/ssh/ssh_host_key -N '' >/dev/null ) # get rid of mistaken rsh diversion (circa 1.2.27-1) if test -L /usr/bin/rsh && dpkg-divert --list '/usr/bin/rsh.real/rsh' | grep -q ' ssh$' then test -L /usr/bin/rlogin && rm /usr/bin/rlogin dpkg-divert --package ssh --remove --rename \ --divert /usr/bin/rsh.real/rlogin /usr/bin/rlogin test -L /usr/bin/rsh && rm /usr/bin/rsh dpkg-divert --package ssh --remove --rename \ --divert /usr/bin/rsh.real/rsh /usr/bin/rsh test -L /usr/bin/rcp && rm /usr/bin/rcp dpkg-divert --package ssh --remove --rename \ --divert /usr/bin/rsh.real/rcp /usr/bin/rcp test -L /usr/man/man1/rlogin.1.gz && rm /usr/man/man1/rlogin.1.gz dpkg-divert --package ssh --remove --rename \ --divert /usr/man/man1/rlogin.real.1.gz /usr/man/man1/rlogin.1.gz test -L /usr/man/man1/rsh.1.gz && rm /usr/man/man1/rsh.1.gz dpkg-divert --package ssh --remove --rename \ --divert /usr/man/man1/rsh.real.1.gz /usr/man/man1/rsh.1.gz test -L /usr/man/man1/rcp.1.gz && rm /usr/man/man1/rcp.1.gz dpkg-divert --package ssh --remove --rename \ --divert /usr/man/man1/rcp.real.1.gz /usr/man/man1/rcp.1.gz rmdir /usr/bin/rsh.real fi fi # sort out whether we're installing ssh suid RET=false # mps comment to get around debconf bug?? #test -e /usr/share/debconf/confmodule && { #. /usr/share/debconf/confmodule #db_version 2.0 #db_get ssh/SUID_client #} if [ "$RET" = "true" ]; then ssh_mod=04755 else ssh_mod=0755 fi RET=true #test -e /usr/share/debconf/confmodule && { #db_get ssh/run_sshd #} if [ "$RET" = "true" ]; then test -f /etc/ssh/sshd_not_to_be_run && rm -f /etc/ssh/sshd_not_to_be_run else touch /etc/ssh/sshd_not_to_be_run fi if command -v suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then suidregister -s ssh /usr/bin/ssh root root $ssh_mod elif [ -e /usr/bin/ssh ]; then chown root.root /usr/bin/ssh chmod $ssh_mod /usr/bin/ssh fi # Automatically added by dh_installdocs if [ "$1" = "configure" ]; then if [ -d /usr/doc -a ! -e /usr/doc/ssh -a -d /usr/share/doc/ssh ]; then ln -sf ../share/doc/ssh /usr/doc/ssh fi fi # End automatically added section # Automatically added by dh_installinit update-rc.d ssh defaults >/dev/null /etc/init.d/ssh start # End automatically added section #db_stop