LoginSignup
2
0

More than 1 year has passed since last update.

bcrypt_ext.bundleインストール時にmach-o file, but is an incompatible architecture (have (x86_64), need (arm64e))のエラー発生

Posted at

事象

アプリの動作確認時に、エラー画面が表示され、ターミナルに以下のエラーが表示された。

dlopen(/Users/arakijun/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bcrypt-3.1.18/lib/bcrypt_ext.bundle, 0x0009): tried: 

'/Users/arakijun/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bcrypt-3.1.18/lib/bcrypt_ext.bundle' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e))) - 

/Users/arakijun/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bcrypt-3.1.18/lib/bcrypt_ext.bundle

bcrypt_ext.bundlex86_64がインストールされているが、arm64eが必要であるというもの。

解決方法

以下のように、インストールし直すことで、改善した。

gem uninstall bcrypt を実行
gem install bcrypt --platform=rubyを実行
Gemfileにgem 'bcrypt', '~> 3.1.11'を記載
bundle installを実行
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0