I want to install libpq-dev
on my Vagrant machine. I install it with
$ apt-get install -y libpq-dev
During installation a prompt appears which asks if it's allowed to restart some services automatically. This prompt breaks my Vagrant provision. How can disable this prompt?
Text:
There are services installed on your system which need to be restarted when certain libraries, such as libpam, libc, and libssl, are upgraded. Since these restarts may cause interruptions of service for the system, you will normally be prompted on each upgrade for the list of services you wish to restart. You can choose this option to avoid being prompted; instead, all necessary restarts will be done for you automatically so you can avoid being asked questions on each library upgrade.
****EDIT ****
Thanks to Patrick's answer and this question I fixed it. Now my Vagrantfile contains:
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libpq-dev
-y
but seems it doesn't change much. seeman apt-get | less +/--force-yes
-y
is an option forapt-get
, but the prompt in question comes fromdpkg
, the package management backend used by apt.DEBIAN_FRONTEND
is read bydpkg
, that's why it works in this case and-y
does not.