1

I'm trying to build a singularity container for working with Microsoft Azure Kinect SDK. I need to install k4a-tools in a headless manner, but I can't figure out the right way to accept the EULA non-interactively. Originally I tried just running:

yes yes | apt -y install k4a-tools

but that seems like a messy way to do it. It did work a couple times, but now it just hangs at that part of the script.

Based on this answer I should be able to use debconf with a command similar to:

echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get install ttf-mscorefonts-installer

but I don't where they got the part between echo and select. I saw similar answers that don't explain where this syntax comes from. Some suggest also setting DEBIAN_FRONTEND=noninteractive, but when I do that the installer quits because the EULA question can't be asked.

Another answer says that I can use debconf-show to find the correct syntax, but debconf-show doesn't return anything.

What is the correct way to accept an EULA from a non-interactive Bash script?

0

1 Answer 1

0

TL;DR I fixed my very specific issue, but still don't know how you're supposed to know the magic words.

echo 'libk4a1.4 libk4a1.4/accepted-eula-hash string 0f5d5c5de396e4fee4c0753a21fee0c1ed726cf0316204edda484f08cb266d76' | debconf-set-selections
echo 'libk4a1.4 libk4a1.4/accept-eula boolean true' | debconf-set-selections

I solved this problem by first checking the man pages man debconf-set-selections which explains the sections of the data format as such

The first value is the name of the package that owns the question. The second is the name of the question, the third value is the type of this question, and the fourth value (through the end of the line) is the value to use for the answer of the question.

Then I saw that the output of the error which said

eula agree question could not be asked

So now I know the package name, libk4a1.4, I took a guess at the question name, eula_agree, I know the type, boolean, and the answer, true. But my guess at the question name was wrong (I still don't know how you're supposed to find it.)

This all led me to discover an issue on github that addresses my specific issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .