I'm writing a hadoop configuration script, but I'm running into trouble installing ganglia. The script needs to run all the way through without any human intervention. Unfortunately, but when it hits this line, it breaks:

sudo apt-get install ganglia-monitor ganglia-webfrontend

The script freezes here. If you attempt to break out with Ctrl-D, or Ctrl-C it fails badly after attempting to run a bunch of commands

Looking more closely, the problem is that ganglia demands user input when you install it. During the apt-get call, a screen like this pops up:

Package configuration

------------------[ Configuring ganglia-webfrontend ]------------------

In order to activate the new configuration, the web server needs to be restarted.
If you choose not to do this automatically, you should do so manually at the first opportunity.                                                                                                              

Restart apache2?
<No>  <Yes>

Is there any way to avoid this screen? Adding the -y tag to apt-get (i.e. apt-get install ganlgi -y) doesn't work.


I had a similar issue with our puppet manifest, when working on a interactive installation. Here is what I did.

export DEBIAN_FRONTEND=noninteractive ; 
apt-get -y install ganlgi
  • Hi is there a typo--ganlgi? The answer is in the ballpark. Add the DEBIAN_FRONTEND=noninteractive in from of apt-get - like this: sudo DEBIAN_FRONTEND=noninteractive apt-get install -y ganglia-webfrontend askubuntu.com/questions/146921/… – Jeremy Hajek May 31 '15 at 22:45

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.