The dig command at line 19 requires dnsutils. It's part of ubuntu-standard, but my VM host doesn't install that by default. Explicitly depending upon it fixes the installation.