3

This is the error message I get when I do a sudo apt upgrade. The upgrade fails and includes this message:

Setting up install-info (6.1.0.dfsg.1-5) ...
/usr/sbin/update-info-dir: 2: /etc/environment: source: not found
dpkg: error processing package install-info (--configure):
subprocess installed post-installation script returned error exit 
status 127
Errors were encountered while processing:
 install-info
E: Sub-process /usr/bin/dpkg returned an error code (1)

I reinstalled install-info through synaptic and am still getting this error and would be grateful for help in setting me straight as to how to read this message and how to react..

Zanna
  • 72,312

3 Answers3

1

I found this way down in a thread elsewhere, and it worked!

if all else fails. What I did was I first changed the directory to:

cd /var/lib/dpkg/info

then I removed everything with .postinst:

sudo rm *.postinst

then update repositories

sudo apt-get update

then everything went back to normal when I did:

sudo apt-get --force-yes install openjdk-7-jre-headless

Note: I did not do this last line, as my issue didn't have anything to do with openjdk. I simply ran the apt update

Zanna
  • 72,312
0

I started to get same thing and just used

for i in $(ls -F *.postinst); do mv ./$i ./$i.old; done in /var/lib/dpkg/info

then my standard ansible playbooks to bring servers current worked

Zanna
  • 72,312
0

I was seeing the same error each time I tried to install something with apt, as well as with updating.

I temporarily simplified /etc/environment:

sudo cp /etc/environment /etc/environment.backup
echo 'PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' | sudo tee /etc/environment
echo 'DEBIAN_FRONTEND=noninteractive' | sudo tee -a /etc/environment

That allowed me to install things without error. I then reverted the changes to /etc/environment:

sudo mv /etc/environment.backup /etc/environment