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.
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).
(You may have missed the curl piece, prior to trying to do the apt-get).
[1] Some details on the different approaches, if curious https://about.gitlab.com/installation/
Make sure you have added gitlabs repository to your system before running
sudo apt-get install gitlab-ce
.Either you add the repository manually to your system or add it with the script found on gitlabs webpage. https://about.gitlab.com/downloads/#ubuntu1604, see part 2.
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
gitlab-ce is not in any of ubuntu main repositories.
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.
It turns out that, while I'm running a 64-bit Kernel, this Linode was created originally as a 32-bit system so all of the user space & libraries are still 32-bit.
Since the Gitlab-ce packages are 64-bit only, that's why it can't install it.
Have you already installed nginx? I was getting a similar error when trying to install something this morning and that was the issue. As for obtaining the gitlab package im not sure.
I too wanted an in house hosted git solution so i turned to turnkey which i typically wouldn't do, but it made it super quick and simple to get up and running, took me about 10 minutes and was pushing within 20. I would recommend you check it out, its based on Debian and has a couple of other neat features. (and some annoying ones)