Gitlab install failure on Linux Mint 18.3 Sylvia

Trying and failing to install Gitlab onto Linux Mint 18.3 Sylvia.

sudo apt-get install gitlab

Verifying we have all required libraries…
Could not find gem ‘devise-two-factor (~> 2.0.0)’ in any of the gem sources
listed in your Gemfile or available on this machine.
dpkg: error processing package gitlab (–configure):
subprocess installed post-installation script returned error exit status 7
Processing triggers for libc-bin (2.23-0ubuntu10) …
Processing triggers for systemd (229-4ubuntu21.4) …
Processing triggers for ureadahead (0.100.0-19) …
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Googled it to death and found similar issues and open bug tickets but no answers or workarounds that worked for me. Do I have to just give up on Gitlab? Or does someone have some secret sauce?


Where are you installing the GitLab package from on your Mint installation? The Ubuntu archive or

You can check this also running this command:
apt-cache policy gitlab

Depending on which packages you are actually trying to install, if that command does not work, you might want to try apt-cache policy gitlab-ee or apt-cache policy gitlab-ce alternatively.