Describe the bug
If you attempt to install the Debian K4A package using apt (or dpkg) the install we fail by default. This is due to the interactive EULA which users need to accept (due to guidance from Microsoft) to install the Debian package.
A common scenario for this would be attempting to use apt to install libk4a1.4 in a Docker container.
To Reproduce
apt-get install libk4a1.4Sub-process /usr/bin/dpkg returned an error code (1)Desktop (please complete the following information):
This is a known issue due to the EULA we are required to present to users. We have a work around to this issue.
The EULA acceptance is done using Debconf. You can manually set entries in the debconf database to accept the EULA before installing the debian package.
The steps to do this are as follows (please substitute in the correct version of the package):
1) Set the environmental variable DEBIAN_FRONTEND to noninteractive. If you are in a Dockerfile you can do this with the ARG command.
Docker
ARG DEBIAN_FRONTEND=noninteractive
This tells dpkg and debconf that you are in a non-interactive environment.
2) Manually set the hash of the accepted EULA in the debconf database.
bash
echo 'libk4a1.4 libk4a1.4/accepted-eula-hash string 0f5d5c5de396e4fee4c0753a21fee0c1ed726cf0316204edda484f08cb266d76' | sudo debconf-set-selections
NOTE: That hash may change if the EULA ever changes.
3) Manually set that the user has accepted the EULA.
bash
echo 'libk4a1.4 libk4a1.4/accept-eula boolean true' | sudo debconf-set-selections
4) Install the libk4a package. In the stdout from the install process you should see
License has already been accepted
We are looking at adding support for allowing users to set an environmental variable to also skip this.
This would look something like
ACCEPT_EULA=Y apt install libk4a1.5
Note: You'd have to be root to get this to work as I don't think sudo would pass the proper environmental variables.
Most helpful comment
We are looking at adding support for allowing users to set an environmental variable to also skip this.
This would look something like
Note: You'd have to be root to get this to work as I don't think
sudowould pass the proper environmental variables.