According toGitlab.comThere was a problem executing the following command:
sudo apt-get install gitlab-ce
The specific errors are as follows:
There was an error running gitlab-ctl reconfigure: bash[migrate gitlab-rails database] (gitlab::database_migrations line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with , but received '1' ---- Begin output of "bash" "/tmp/chef-script20190428-15510-28f5ti" ---- STDOUT: WARNING: No valid license encryption key provided. rake aborted! NameError: uninitialized constant Elasticsearch /opt/gitlab/embedded/service/gitlab-rails/config/initializers/elastic_client_setup.rb:5:in `<top (required)>' /opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:6:in `<top (required)>' /opt/gitlab/embedded/bin/bundle:23:in `load' /opt/gitlab/embedded/bin/bundle:23:in `<main>' Tasks: TOP => gitlab:db:configure => environment (See full trace by running task with --trace) STDERR: ---- End output of "bash" "/tmp/chef-script20190428-15510-28f5ti" ---- Ran "bash" "/tmp/chef-script20190428-15510-28f5ti" returned 1
Source and version information of installed gitlab installation package:
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial InRelease gitlab-ce (11.10.1-ce.0)
Description: Ubuntu 16.04.6 LTS (x86_64) Release: 16.04 Codename: xenial
Methods already tried
- Reinstall Gitlab
- Change Gitlab to a lower version (all the way to 8)
- After installation, restart the server
For the first time
sudo apt-get install gitlab-ee, found wrong and unloaded.
After that, it will be executed again.
sudo apt-get install gitlab-ceReport the mistake in the question.
Later, all documents related to gitlab were cleaned and installed successfully.
The directory of files I cleaned up is as follows:
opt/gitlab etc/gitlab var/opt/gitlab var/log/gitlab