Error compiling from source

Hello.

Im trying to compile Gitlab 9.3 from source code. Following the tutorial, im in “Install GitLab Shell”

So i execute: “sudo -u git -H bundle exec rake gitlab:shell:install REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production SKIP_STORAGE_VALIDATION=true” and i get the next error:

root@scw-9386ee:/home/git/gitlab# sudo -u git -H bundle exec rake gitlab:shell:install REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production SKIP_STORAGE_VALIDATION=true
mkdir -p /home/git/.ssh: OK
chmod 700 /home/git/.ssh: OK
mkdir -p /home/git/repositories: OK
chmod ug+rwX,o-rwx /home/git/repositories: OK
command failed: {“GOPATH”=>“/home/git/gitlab-shell/go_build”, “GO15VENDOREXPERIMENT”=>“1”} go install gitlab.com/gitlab-org/gitlab-shell/go/cmd/
rake aborted!
command failed: bin/compile
/home/git/gitlab/lib/tasks/gitlab/shell.rake:49:in block (5 levels) in <main>' /home/git/gitlab/lib/tasks/gitlab/shell.rake:47:in each’
/home/git/gitlab/lib/tasks/gitlab/shell.rake:47:in block (4 levels) in <main>' /home/git/gitlab/lib/tasks/gitlab/shell.rake:18:in chdir’
/home/git/gitlab/lib/tasks/gitlab/shell.rake:18:in block (3 levels) in <main>' /usr/local/bin/bundle:22:in load’
/usr/local/bin/bundle:22:in `’
Tasks: TOP => gitlab:shell:install
(See full trace by running task with --trace)

The same with --trace

root@scw-9386ee:/home/git/gitlab# sudo -u git -H bundle exec rake gitlab:shell:install REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production SKIP_STORAGE_VALIDATION=true --trace
** Invoke gitlab:shell:install (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute gitlab:shell:install
mkdir -p /home/git/.ssh: OK
chmod 700 /home/git/.ssh: OK
mkdir -p /home/git/repositories: OK
chmod ug+rwX,o-rwx /home/git/repositories: OK
command failed: {“GOPATH”=>“/home/git/gitlab-shell/go_build”, “GO15VENDOREXPERIMENT”=>“1”} go install gitlab.com/gitlab-org/gitlab-shell/go/cmd/
rake aborted!
command failed: bin/compile
/home/git/gitlab/lib/tasks/gitlab/shell.rake:49:in block (5 levels) in <main>' /home/git/gitlab/lib/tasks/gitlab/shell.rake:47:in each’
/home/git/gitlab/lib/tasks/gitlab/shell.rake:47:in block (4 levels) in <main>' /home/git/gitlab/lib/tasks/gitlab/shell.rake:18:in chdir’
/home/git/gitlab/lib/tasks/gitlab/shell.rake:18:in block (3 levels) in <main>' /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:240:in block in execute’
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in each' /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in execute’
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:179:in block in invoke_with_call_chain' /usr/local/lib/ruby/2.3.0/monitor.rb:214:in mon_synchronize’
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in invoke_with_call_chain' /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:165:in invoke’
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:150:in invoke_task' /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in block (2 levels) in top_level’
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in each' /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in block in top_level’
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:115:in run_with_threads' /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:100:in top_level’
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:78:in block in run' /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:176:in standard_exception_handling’
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:75:in run' /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/bin/rake:33:in <top (required)>’
/home/git/gitlab/vendor/bundle/ruby/2.3.0/bin/rake:22:in load' /home/git/gitlab/vendor/bundle/ruby/2.3.0/bin/rake:22:in <top (required)>’
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.1/lib/bundler/cli/exec.rb:74:in load' /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.1/lib/bundler/cli/exec.rb:74:in kernel_load’
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.1/lib/bundler/cli/exec.rb:27:in run' /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.1/lib/bundler/cli.rb:360:in exec’
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in invoke_command’
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor.rb:369:in dispatch' /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.1/lib/bundler/cli.rb:20:in dispatch’
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor/base.rb:444:in start' /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.1/lib/bundler/cli.rb:10:in start’
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.1/exe/bundle:35:in block in <top (required)>' /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.1/lib/bundler/friendly_errors.rb:121:in with_friendly_errors’
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.1/exe/bundle:27:in <top (required)>' /usr/local/bin/bundle:22:in load’
/usr/local/bin/bundle:22:in `’
Tasks: TOP => gitlab:shell:install

I’m assuming you’re also using the system provided golang-1.8 rather than following the manual installation step. That’s reasonable; the system-provided version is high enough.

The problem is the “go” command is not recognised since it’s not on the path. You can add /usr/lib/go-1.8/bin/ to the path, or do as I did and simply create a symlink: ln -s /usr/lib/go-1.8/bin/go /bin/go.