You can do a couple of things for avoiding this. Setting the DEBIAN_FRONTEND
variable to noninteractive
and using -y
flag. For example:
export DEBIAN_FRONTEND=noninteractive
apt-get -y install [packagename]
If you need to install it via sudo, use:
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install [packagename]
参考资料:
How do I ask apt-get to skip any interactive post-install configuration steps?:http://serverfault.com/questions/227190/how-do-i-ask-apt-get-to-skip-any-interactive-post-install-configuration-steps
http://askubuntu.com/questions/448358/automating-apt-get-install-with-assume-yes
时间: 2024-10-26 20:45:29