您的位置:首页 > 运维架构 > Linux

【Linux】apt-get install 怎么阻止弹出框,使用脚本默认自动安装?

2016-04-22 15:45 477 查看
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]
参考资料:
[/code]
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-stepshttp://superuser.com/questions/928463/hit-enter-automatically-when-running-apt-get-install-package-prompts-a-dialoghttp://askubuntu.com/questions/448358/automating-apt-get-install-with-assume-yes

                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: