15

I am building my own ubuntu VM with packer to host on Atlas and I'm using the packer build template.json to test if it will be a success if I was to use packer push template.json I am getting this error when the I run the mysql.sh script.

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:

What is it that I'm missing with debconf:

Thanks.

1

3 Answers 3

14

can you add

export DEBIAN_FRONTEND="noninteractive"

before you run your script

1
  • 9
    No success. Ive seen this in my research about this issue and it still hasn't work Jan 14, 2016 at 17:05
4

Running the following fixed the issue for me:

echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
1
  • I'd recommend to run debconf-show debconf to see the default so that it helps to restore the default, if something happens while executing the above. Jan 26, 2023 at 5:51
0

hmmm... just a wild guess, from looking at the mysql.sh script, but shouldn't lines 22 & 23 also take into account the above if statement?

The mysql_package has changed name, so the selections in your debconf should probably be mysql-server-5.6 instead of mysql-server if [ $2 == "5.6" ] (which I believe is true in your case, as can be seen from your log ; )

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.