Ubuntu – Issues installing gitlab-ce on Ubuntu 16.04 (xenial)

gitlabUbuntuubuntu-16.04

I've been trying to install gitlab-ce from the Omnibus packages for Ubuntu 16.04 (GNU/Linux 4.6.5-x86_64-linode71 x86_64) and I'm completely stuck.

Issue #1

All of the docs say to run the command sudo apt-get install gitlab-ce but I always get a Unable to locate package gitlab-ce error.

Doing an sudo apt search gitlab shows that there is a package just called gitlab so I'm assuming the docs are wrong and I'm supposed to install that.

Issue #2

Installation runs normally until it gets to the point of doing the nginx setup and then it fails with the following error:

Creating config file /etc/nginx/sites-available/gitlab.mydomain.net with new version
cp: cannot create regular file '/etc/nginx/sites-available/gitlab.mydomain.net': No such file or directory
dpkg: error processing package gitlab (--configure):
 subprocess installed post-installation script returned error exit status 1 

I'm not doing anything special with my install.

Can anyone give me any hints?


Update 1

I didn't realize that there was a stock gitlab package in the Ubuntu so that explains at least part of my problem.

Just to clarify, I did run through the full instructions on the about page so I've added the gitlab-ce repo to my apt sources:

-rw-r--r-- 1 root root 261 Aug 31 16:03 gitlab_gitlab-ce.list

The contents of the above are

# this file was generated by packages.gitlab.com for
# the repository at https://packages.gitlab.com/gitlab/gitlab-ce

deb https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ xenial main
deb-src https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ xenial main

I also see the gitlab source being referenced when I do an apt-get update:

Hit:10 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu xenial InRelease

I've run sudo apt-get update and the gitlab-ce package isn't there. I wonder if it's something about my system that isn't compatible with the packages?


Update 2

Looks like it's an system architecture problem.

Despite the fact that running uname -a shows Linux li424-65 4.6.5-x86_64-linode71, I get the following error if I try to install the .deb manually.

package architecture (amd64) does not match system (i386)

This is a Linode VM so I bet it has something to do with that.

Best Answer

There are multiple ways to install gitlab-ce[1]. It looks like you have crossed two of them. In particular you are trying to follow the Omnibus instructions (albeit with a missing step or two) while utilizing the stock Ubuntu package of gitlab (which is discouraged by GL officially).

  1. The Omnibus package repository must added to your system otherwise the gitlab-ce package will not be available. There is a scripted way to do this and a more manual say for those that like to know what's being changed in their system. The process is documented in step two of the Omnibus installation guide: https://about.gitlab.com/downloads/#ubuntu1604

(You may have missed the curl piece, prior to trying to do the apt-get).

  1. See if resolving issue #1 solves your other issue.

[1] Some details on the different approaches, if curious https://about.gitlab.com/installation/

Related Topic