码迷,mamicode.com
首页 > 系统相关 > 详细

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

时间:2016-04-22 16:03:23      阅读:162      评论:0      收藏:0      [点我收藏+]

标签:

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://superuser.com/questions/928463/hit-enter-automatically-when-running-apt-get-install-package-prompts-a-dialog

http://askubuntu.com/questions/448358/automating-apt-get-install-with-assume-yes

 



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

标签:

原文地址:http://www.cnblogs.com/junneyang/p/5421539.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!