简体   繁体   中英

Macbook/M1 CPU: instal hiptest-publisher/executable-hooks failed

When I run hiptest-publisher on Mac's termainl, I'm getting the following error.

Ignoring executable-hooks-1.6.1 because its extensions are not built. Try: gem pristine executable-hooks --version 1.6.1

So I run gem install executable-hooks -v 1.6.1 and getting the following error. It should related to Apple's new M1 CPU.

Ignoring executable-hooks-1.6.1 because its extensions are not built. Try: gem pristine executable-hooks --version 1.6.1
Error loading RubyGems plugin "/Users/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/plugins/executable-hooks_plugin.rb": cannot load such file -- executable-hooks/wrapper (LoadError)
Building native extensions. This could take a while...
ERROR:  Error installing executable-hooks:
    ERROR: Failed to build gem native extension.

    current directory: /Users/.rvm/gems/ruby-3.0.0/gems/executable-hooks-1.6.1/ext/wrapper_installer
/opt/homebrew/opt/ruby/bin/ruby -I /opt/homebrew/Cellar/ruby/3.1.3/lib/ruby/3.1.0 extconf.rb
/Users/.rvm/gems/ruby-3.0.0/gems/executable-hooks-1.6.1/lib/executable-hooks/regenerate_binstubs_command.rb:101:in `initialize': Permission denied @ rb_sysopen - /opt/homebrew/Cellar/ruby/3.1.3/lib/ruby/gems/3.1.0/bin/rdbg (Errno::EACCES)
    from /Users/.rvm/gems/ruby-3.0.0/gems/executable-hooks-1.6.1/lib/executable-hooks/regenerate_binstubs_command.rb:101:in `open'
    from /Users/.rvm/gems/ruby-3.0.0/gems/executable-hooks-1.6.1/lib/executable-hooks/regenerate_binstubs_command.rb:101:in `block in try_to_fix_binstubs'
    from /Users/.rvm/gems/ruby-3.0.0/gems/executable-hooks-1.6.1/lib/executable-hooks/regenerate_binstubs_command.rb:99:in `map'
    from /Users/.rvm/gems/ruby-3.0.0/gems/executable-hooks-1.6.1/lib/executable-hooks/regenerate_binstubs_command.rb:99:in `try_to_fix_binstubs'
    from /Users/.rvm/gems/ruby-3.0.0/gems/executable-hooks-1.6.1/lib/executable-hooks/regenerate_binstubs_command.rb:76:in `block in execute_no_wrapper'
    from /Users/.rvm/gems/ruby-3.0.0/gems/executable-hooks-1.6.1/lib/executable-hooks/regenerate_binstubs_command.rb:73:in `each'
    from /Users/.rvm/gems/ruby-3.0.0/gems/executable-hooks-1.6.1/lib/executable-hooks/regenerate_binstubs_command.rb:73:in `execute_no_wrapper'
    from extconf.rb:20:in `<main>'
bundler 2.3.26
debug 1.6.3

extconf failed, exit code 1

Gem files will remain installed in /Users/.rvm/gems/ruby-3.0.0/gems/executable-hooks-1.6.1 for inspection.
Results logged to /Users/.rvm/gems/ruby-3.0.0/extensions/arm64-darwin-21/3.1.0/executable-hooks-1.6.1/gem_make.out

You have a shell environment that is confused about where to find Ruby and where to install gems. It's mixing up your Homebrew-installed version of Ruby and your RVM gems.

You should uninstall your Homebrew version of Ruby and ensure that which ruby refers to the version of Ruby that exists in your .rvm directory instead.

  1. brew uninstall ruby
  2. rm -rf ~/.rvm to completely remove RVM, Ruby and gems
  3. Follow the steps at https://stackoverflow.com/a/61375910/3784008 to reinstall RVM and Ruby (make sure you specify the version you need instead of 2.2.2)
  4. Retry gem install executable-hooks -v 1.6.1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM