Correctly place 'DEBIAN_FRONTEND=noninteractive' variable before commands requiring it.