When installing certain packages, for example gitlab-runner
, a directory needs to be created in /home
/. If the home directories are automounted on NFS, then installation will fail.
$ sudo apt install -y [package] Setting up gitlab-runner (12.1.0) ... GitLab Runner: creating gitlab-runner... useradd: cannot create directory /home/gitlab-runner dpkg: error processing package gitlab-runner (--configure): subprocess installed post-installation script returned error exit status 12 Errors were encountered while processing: gitlab-runner E: Sub-process /usr/bin/dpkg returned an error code (1)
What is the best workaround for this problem?
Have dpkg
create the home directory in another location such as /var
?
The workaround I found for gitlab-runner is to manually create a 'gitlab-runner' user with a specified local home directory.