Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant provision — dpkg-preconfigure: unable to re-open stdin

I am writing a provision script for Vagrant to install all the packages necessary for deploying an app developed with Meteor 1.6. So far, the script is working well, but at three points during its execution, I get the following output in red in the terminal window:

==> default: dpkg-preconfigure: unable to re-open stdin: No such file or directory

This happens once each while the following packages are installing: * MongoDB * nginx * Phusion Passenger

I haven't yet seen any adverse side-effects

Is this a warning or an error? What is dpkg-preconfigure trying to do? What do I need to do to handle it elegantly?

like image 616
James Newton Avatar asked Nov 21 '17 08:11

James Newton


Video Answer


1 Answers

Add this line to your provisioning script to prevent debconf from trying to open stdin:

export DEBIAN_FRONTEND=noninteractive

This worked for me on Ubuntu 16.04

(Thanks to serverfault)

like image 171
jonasfh Avatar answered Oct 08 '22 23:10

jonasfh