Debian install-info.postinst: update-info-dir: not found

Today my Debian stable upgrade to testing went bad (read VERY BAD) by letting apt-get -f install remove packages such as libc6, linux-base, base-files and other quite important stuff :) Initially even /bin/sh did not work, but luckily I was able to restore it by symlinking ln -s /bin/sh.distrib /bin/sh . After several hours of manually downloading packages and resolving version conflicts, I ran to this problem:

dpkg -i install-info_4.13a.dfsg.1-8_i386.deb
(Reading database ... 23530 files and directories currently installed.)
Preparing to replace install-info 4.13a.dfsg.1-6 (using install-info_4.13a.dfsg.1-8_i386.deb) ...
Unpacking replacement install-info ...
Setting up install-info (4.13a.dfsg.1-8) ...
/var/lib/dpkg/info/install-info.postinst: 32: /var/lib/dpkg/info/install-info.postinst: update-info-dir: not found
dpkg: error processing install-info (--install):
subprocess installed post-installation script returned error exit status 127
Processing triggers for man-db ...
Errors were encountered while processing:
install-info

I googled for answers, but found none, except to reinstall the whole system:
http://ubuntuforums.org/archive/index.php/t-1547223.html

The solution is simpler than that. The problem in my case was that apt-get had removed bash, and update-info-dir requires /bin/bash. I executed the script

/usr/sbin/update-info-dir
-bash: /usr/sbin/update-info-dir: /bin/bash: bad interpreter: No such file or directory

The apt-get error message and previous posters did not figure this out. Unfortunately apt-get install bash did not quite work, but it downloaded the package to

cd /var/cache/apt/archives

from where I was able to

dpkg -i bash_4.1-3_i386.deb

and was able to continue restoring the system :)

One thought on “Debian install-info.postinst: update-info-dir: not found

Leave a Reply