apt-get启动非交互模式:
使用apt-get安装软件包添加-y,-q参数
export DEBIAN_FRONTEND=noninteractive apt-get -y -q install [packagename]
使用sudo命令
sudo DEBIAN_FRONTEND=noninteractive apt-get -y -q install [packagename]