This is a very short post, but it might be useful for someone with the same problem. I was trying to install fcron on a remote machine via an automated script, but apt-get install couldn’t finish because a dialog using whiptail came up. It wasn’t the common prompt asking yes or no, which can be ignored by the -y option.
Fortunately, there’s a smart workaround to get rid of these prompts:
DEBIAN_FRONTEND=noninteractive apt-get install -q -y fcron
Basically we set the type of user interface used for the installer to noninteractive mode before installing the package. You can always reset DEBIAN_FRONTEND to its default value.