`gdk install` fails on M1 mac with LoadError: cannot load such file -- google/protobuf_c
Overview
Encountered this error while installing GDK from scratch with gdk install gitlab_repo=git@gitlab.com:gitlab-org/gitlab.git
--------------------------------------------------------------------------------
Generating gitlab-org/gitlab Rails translations
--------------------------------------------------------------------------------
rake aborted!
LoadError: cannot load such file -- google/protobuf_c
/Users/tkuah/code/gdk-ee/gitlab/config/application.rb:15:in `<top (required)>'
/Users/tkuah/code/gdk-ee/gitlab/Rakefile:9:in `require'
/Users/tkuah/code/gdk-ee/gitlab/Rakefile:9:in `<top (required)>'
/Users/tkuah/.rbenv/versions/2.7.4/bin/bundle:23:in `load'
/Users/tkuah/.rbenv/versions/2.7.4/bin/bundle:23:in `<main>'
Caused by:
LoadError: dlopen(/Users/tkuah/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/google-protobuf-3.17.3-universal-darwin/lib/google/2.7/protobuf_c.bundle, 0x0009): tried: '/Users/tkuah/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/google-protobuf-3.17.3-universal-darwin/lib/google/2.7/protobuf_c.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/protobuf_c.bundle' (no such file), '/usr/lib/protobuf_c.bundle' (no such file) - /Users/tkuah/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/google-protobuf-3.17.3-universal-darwin/lib/google/2.7/protobuf_c.bundle
/Users/tkuah/code/gdk-ee/gitlab/config/application.rb:15:in `<top (required)>'
/Users/tkuah/code/gdk-ee/gitlab/Rakefile:9:in `require'
/Users/tkuah/code/gdk-ee/gitlab/Rakefile:9:in `<top (required)>'
/Users/tkuah/.rbenv/versions/2.7.4/bin/bundle:23:in `load'
/Users/tkuah/.rbenv/versions/2.7.4/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)
make: *** [.gitlab-translations] Error 1
❌️ ERROR: Failed to install.
-------------------------------------------------------
You can try the following that may be of assistance:
- Run 'gdk doctor'.
- Visit the troubleshooting documentation:
https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/troubleshooting.md.
- Visit https://gitlab.com/gitlab-org/gitlab-development-kit/-/issues to
see if there are known issues.
- Run 'gdk reset-data' if appropriate.
- Run 'gdk pristine' which will restore your GDK to a pristine state.
-------------------------------------------------------
Steps to replicate (optional)
Proposal (optional)
Environment (optional)
- Operating system: macOS M1 Max
- The contents of your
gdk.yml
- Ruby version: ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [arm64-darwin21]
- GDK version: 88a4e897
Edited by Thong Kuah