debconf:无法初始化前端:对话框

Rud*_*sop 4 mysql ubuntu json packer

我正在使用打包器构建我自己的ubuntu VM 来托管Atlas,我正在使用它packer build template.json来测试它是否会成功,如果我要使用packer push template.json我在运行mysql.sh脚本时遇到此错误.

virtualbox-iso: debconf: unable to initialize frontend: Dialog
    virtualbox-iso: debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
    virtualbox-iso: debconf: falling back to frontend: Readline
    virtualbox-iso: Configuring mysql-server-5.6
    virtualbox-iso: ----------------------------
    virtualbox-iso:
    virtualbox-iso: While not mandatory, it is highly recommended that you set a password for the
    virtualbox-iso: MySQL administrative "root" user.
    virtualbox-iso:
    virtualbox-iso: If this field is left blank, the password will not be changed.
    virtualbox-iso:
Run Code Online (Sandbox Code Playgroud)

我错过了什么 debconf:

谢谢.

Fré*_*nri 7

你能加吗?

export DEBIAN_FRONTEND="noninteractive"
Run Code Online (Sandbox Code Playgroud)

在运行脚本之前

  • 没有成功.我在关于这个问题的研究中看到了这一点,但它仍然无效 (2认同)