Ubuntu – dpkg-reconfigure: unable to re-open stdin: No file or directory

aptdpkgUbuntuvagrant

I am building a provisioning script for a ubuntu vagrant vm, on a ubuntu host, both 12.10 64bit When installing the following packages:

sudo apt-get -y install php5-xsl graphviz php-pear unison

I get the warning:

dpkg-reconfigure: unable to re-open stdin: No file or directory

have tried searching but results are throwing up every other error with apt-get possible, can't find out how to supress the warning above. The installs work, but the warning above is causing error lines in the vagrant up stdout.

Anybody any idea what could be the cause or how to suppress the warning

Best Answer

I got the error message to go away by putting the following in my provisioning script, prior to any apt-get calls:

export DEBIAN_FRONTEND=noninteractive

This makes debconf use a frontend that expects no interactive input at all, preventing it from even trying to access stdin.

Related Topic