Do some debian builds not have lsb_release?

Solution 1:

There is an lsb-release package that supplies the lsb_release command. This is separate from the lsb, lsb-base, and lsb-core packages. None of the lsb packages are essential. So if your package needs lsb_release it should specify that it depends on lsb-release.

Solution 2:

Not all Debian builds have lsb_release. For example, even the official Ubuntu Docker image does not have lsb_release.

The alternative is to use cat /etc/os-release.