Can't run any program in my environment: `homedir(): no such file or directory`

Figured it out: I need to set the HOME environment variable to the path of a directory which exists.