簡體   English   中英

Macbook/M1 CPU:安裝 hiptest-publisher/executable-hooks 失敗

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

當我在 Mac 的終端上運行 hiptest-publisher 時,出現以下錯誤。

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

所以我運行gem install executable-hooks -v 1.6.1並收到以下錯誤。 它應該與Apple的新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

您有一個 shell 環境,它對在哪里可以找到 Ruby 以及在哪里安裝 gem 感到困惑。 它混淆了你的 Homebrew 安裝版本 Ruby 和你的 RVM 寶石。

您應該卸載 Ruby 的 Homebrew 版本,並確保which ruby指的是.rvm目錄中存在的 Ruby 版本。

  1. brew uninstall ruby
  2. rm -rf ~/.rvm完全刪除 RVM、Ruby 和 gems
  3. 按照https://stackoverflow.com/a/61375910/3784008中的步驟重新安裝 RVM 和 Ruby(確保指定您需要的版本而不是 2.2.2)
  4. 重試gem install executable-hooks -v 1.6.1

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM