【问题标题】:Gitlab install fails at gitlab-ctl reconfigureGitlab 安装在 gitlab-ctl reconfigure 失败
【发布时间】:2019-05-04 16:51:12
【问题描述】:

所以,我一直在关注 GitLab 的安装指南(在 Debian Stretch 上),但总是遇到同样的错误...

链接:https://about.gitlab.com/install/#debian

错误:

There was an error running gitlab-ctl reconfigure:
execute[/opt/gitlab/embedded/bin/initdb -D p /var/opt/gitlab/postgresql/data -E UTF8 (postgresql::enable line 80) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8 ----
STDOUT: The files belonging to this database system will be owned by user "gitlab-psql".
This user must also own the server process.
STDERR: initdb: invalid locale settings; check LANG and LC_* environment variables
---- End output of /opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8 ----
Ran /opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8 returned 1

我已经尝试了一些东西,但由于我在其他地方找不到这个问题,所以它并没有让我走得太远。我对 Linux 没有那么丰富的经验,所以我希望能得到一些帮助。

提前致谢!

【问题讨论】:

  • 您在哪个平台上运行?我已经在 AWS 实例上完成了这个确切的过程,没有任何问题。另外:“STDOUT:属于该数据库系统的文件将归用户“gitlab-psql”所有。该用户还必须拥有服务器进程。这表明您已在安装和重新配置之间切换用户。
  • @Oren_C 好吧,我正在尝试在我的家庭 Debian Stretch 上安装 Gitlab 的 Omnibus 版本,即使单独运行每个命令(不应切换用户),该过程也会失败。我也没有手动更改用户,并且始终使用 Sudo。
  • 让我们从头开始。您能否将刚开始该过程时收到的失败添加到您的问题中?如果该过程在某些时候失败,则无需继续执行说明。让我们找出是什么阻碍了您的开始。
  • 无论我自己运行 gitlab-ctl reconfigure 还是让安装过程完成它的工作,我粘贴的消息是我收到的唯一错误消息,并且它永远不会改变。
  • 您是否对区域设置进行了任何更改?这会重演:“无效的区域设置;检查 LANG 和 LC_* 环境变量”

标签: linux git postgresql debian gitlab


【解决方案1】:

我认为您的问题是因为您使用的是拉丁排序规则。

在 UTF8 上使用任何排序规则 (LANG en_US.UTF-8)。

如果您使用的是 Debian,请不要更改 LANG 或 LC_ 变量。使用这个命令:

dpkg-reconfigure locales

在界面上,请选择所需的界面(您甚至可以尝试使用 fr_FR,但始终使用 utf8 选项)。不要使用 LATIN 或 ISO_8859 替代品。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-09-26
    • 2016-03-29
    • 1970-01-01
    • 2020-09-24
    • 1970-01-01
    • 2012-12-17
    • 1970-01-01
    • 2019-09-05
    相关资源
    最近更新 更多