在Ubuntu 16.04上安装gitlab-ce的问题(xenial)

我一直在尝试从Ubuntu 16.04(GNU / Linux 4.6.5-x86_64-linode71 x86_64)的Omnibus软件包中安装gitlab-ce,而且我完全陷入困境。

问题#1

所有的文档说运行命令sudo apt-get install gitlab-ce但我总是得到一个无法find包gitlab-ce错误。

做一个sudo apt search gitlab显示,有一个名为gitlab的包,所以我假设文档是错误的,我应该安装它。

问题#2

安装运行正常,直到到达nginx设置的位置,然后失败,出现以下错误:

 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 

我没有做任何特别的安装。

任何人都可以给我任何提示?


更新1

我没有意识到在Ubuntu有一个股票gitlab包,这至less解释了我的问题的一部分。

只是为了澄清,我已经完成了关于页面的完整说明,所以我已经将gitlab-ce回购添加到了我的apt源代码中:

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

以上的内容是

 # 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 

当我进行apt-get update时,我也看到了引用的gitlab源代码:

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

我已经运行sudo apt-get update ,而gitlab-ce软件包不在那里。 我不知道是否是与我的系统不兼容的软件包?


更新2

看起来这是一个系统架构问题。

尽pipe运行uname -a显示Linux li424-65 4.6.5-x86_64-linode71 ,但如果尝试手动安装.deb,则会出现以下错误。

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

这是一个Linode虚拟机,所以我敢打赌这跟这个有关。

有多种方法可以安装gitlab-ce [1]。 看起来你已经穿过了其中的两个。 特别是你正在尝试遵循Omnibus指令(尽pipe缺less一两个步骤),同时使用gitlab的Ubuntu软件包(GL官方不鼓励)。

  1. Omnibus软件包存储库必须添加到您的系统,否则gitlab-ce软件包将不可用。 有一个脚本化的方式来做到这一点,并为那些想知道系统中正在发生什么变化的人提供更多的手动说明。 该过程在Omnibus安装指南的第二步中有logging: https : //about.gitlab.com/downloads/#ubuntu1604

(你可能已经错过了curl的一块,在尝试做apt-get之前)。

  1. 看看解决问题#1是否解决了你的其他问题。

[1]关于不同方法的一些细节,如果好奇https://about.gitlab.com/installation/

确保在运行之前将gitlabs存储库添加到系统中
sudo apt-get install gitlab-ce

您可以手动将系统信息库添加到系统中,也可以将其添加到gitlabs网页上的脚本中。 https://about.gitlab.com/downloads/#ubuntu1604 ,见第2部分。

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

gitlab-ce不在Ubuntu的任何主要版本库中。

看起来这是一个系统架构问题。

尽pipe运行uname -a显示Linux li424-65 4.6.5-x86_64-linode71,但如果尝试手动安装.deb,则会出现以下错误。

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

事实certificate,当我运行一个64位的内核时,这个Linode最初是作为一个32位系统创build的,所以所有的用户空间和库仍然是32位的。

由于Gitlab-ce软件包只有64位,所以无法安装。

你已经安装了nginx吗? 我今天上午试图安装某些东西时遇到了类似的错误,那就是问题所在。 至于获得gitlab包im不知道。

我也想要一个内部托pipegit解决scheme,所以我转向交钥匙 ,我通常不会这样做,但它使得它超级快速和简单的起床和运行,花了我约10分钟,并在20内推。我会build议你看看它,它基于Debian,还有其他一些简洁的function。 (和一些讨厌的人)