2

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?

hanxue
  • 1,377
  • 2
  • 11
  • 12

1 Answers1

4

The workaround I found for gitlab-runner is to manually create a 'gitlab-runner' user with a specified local home directory.

upen
  • 41
  • 2
  • To be clear, if you add the user **before** installing the package, the package will not try to create the user under `/home`. – Aaron Copley Aug 19 '19 at 20:56