ffi Library not loaded: fix error in /opt/brew/opt/libffi/lib/libffi.6.dylib

Overview

Error after brew update rspec falls

How to fix this time

** Paste symlink **

Reason for adoption

――You don't have to look up too much

Concern

――It seems that something will fit unintentionally at the time of update

whatever

TODO: It's also on the official issue, so I'll read it next time. If anyone has read it, please let me know (other power application ...) dyld: Library not loaded: /usr/local/opt/libffi/lib/libffi.6.dylib · Issue #7 · platformio/platform-lattice_ice40

Error excerpt

LoadError:
  dlopen(/Users/user/dev/my-markdown/vendor/bundler/ruby/2.6.0/gems/ffi-1.11.1/lib/ffi_c.bundle, 9): Library not loaded: /opt/brew/opt/libffi/lib/libffi.6.dylib

search

/opt/brew/opt/libffi/lib/libffi.6.dylib not loaded, so let's say

➤ cd /opt/brew/opt/libffi/lib/
➤ ls
libffi.7.dylib libffi.a       libffi.dylib   pkgconfig

Certainly there is no libffi.6.dylib

Paste symlink

ln libffi.7.dylib libffi.6.dylib

fixed

Impressions

Maybe it's better to reinstall something so that it becomes libffi.6.dylib, but don't do it because it's a hassle.

As mentioned above, if an error occurs, deal with it or issue It was a rough way to fix the policy to read next time.

Appendix: Full error

➤ rspec spec/models/post_spec.rb:6

An error occurred while loading ./spec/models/post_spec.rb.
Failure/Error: require File.expand_path('../../config/environment', __FILE__)

LoadError:
  dlopen(/Users/user/dev/my-markdown/vendor/bundler/ruby/2.6.0/gems/ffi-1.11.1/lib/ffi_c.bundle, 9): Library not loaded: /opt/brew/opt/libffi/lib/libffi.6.dylib
    Referenced from: /Users/use(neocomplete_start_auto_complete)/dev/my-markdown/vendor/bundler/ruby/2.6.0/gems/ffi-1.11.1/lib/ffi_c.bundle
    Reason: image not found - /Users/user/dev/my-markdown/vendor/bundler/ruby/2.6.0/gems/ffi-1.11.1/lib/ffi_c.bundle
# ./vendor/bundler/ruby/2.6.0/gems/ffi-1.11.1/lib/ffi.rb:6:in `require'
# ./vendor/bundler/ruby/2.6.0/gems/ffi-1.11.1/lib/ffi.rb:6:in `rescue in <top (required)>'
# ./vendor/bundler/ruby/2.6.0/gems/ffi-1.11.1/lib/ffi.rb:3:in `<top (required)>'
# ./vendor/bundler/ruby/2.6.0/gems/sassc-2.3.0/lib/sassc/native.rb:3:in `require'
# ./vendor/bundler/ruby/2.6.0/gems/sassc-2.3.0/lib/sassc/native.rb:3:in `<top (required)>'
# ./vendor/bundler/ruby/2.6.0/gems/sassc-2.3.0/lib/sassc.rb:31:in `require_relative'
# ./vendor/bundler/ruby/2.6.0/gems/sassc-2.3.0/lib/sassc.rb:31:in `<top (required)>'
# ./vendor/bundler/ruby/2.6.0/gems/sassc-rails-2.1.2/lib/sassc/rails.rb:5:in `require'
# ./vendor/bundler/ruby/2.6.0/gems/sassc-rails-2.1.2/lib/sassc/rails.rb:5:in `<top (required)>'
# ./vendor/bundler/ruby/2.6.0/gems/sassc-rails-2.1.2/lib/sassc-rails.rb:3:in `require_relative'
# ./vendor/bundler/ruby/2.6.0/gems/sassc-rails-2.1.2/lib/sassc-rails.rb:3:in `<top (required)>'
# ./vendor/bundler/ruby/2.6.0/gems/administrate-0.13.0/lib/administrate/engine.rb:5:in `require'
# ./vendor/bundler/ruby/2.6.0/gems/administrate-0.13.0/lib/administrate/engine.rb:5:in `<top (required)>'
# ./vendor/bundler/ruby/2.6.0/gems/administrate-0.13.0/lib/administrate.rb:1:in `require'
# ./vendor/bundler/ruby/2.6.0/gems/administrate-0.13.0/lib/administrate.rb:1:in `<top (required)>'
# ./config/application.rb:22:in `<top (required)>'
# ./config/environment.rb:4:in `require_relative'
# ./config/environment.rb:4:in `<top (required)>'
# ./spec/rails_helper.rb:6:in `require'
# ./spec/rails_helper.rb:6:in `<top (required)>'
# ./spec/models/post_spec.rb:3:in `require'
# ./spec/models/post_spec.rb:3:in `<top (required)>'
# ------------------
# --- Caused by: ---
# LoadError:
#   cannot load such file -- 2.6/ffi_c
#   ./vendor/bundler/ruby/2.6.0/gems/ffi-1.11.1/lib/ffi.rb:4:in `require'
Run options: include {:locations=>{"./spec/models/post_spec.rb"=>[6]}}

All examples were filtered out

Randomized with seed 34574


Finished in 0.00064 seconds (files took 2.04 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples


Recommended Posts

ffi Library not loaded: fix error in /opt/brew/opt/libffi/lib/libffi.6.dylib
Fix in 5 seconds Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
rails error Library not loaded
Error in ./gradlew: Symbol not found
Library not loaded: support for /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (LoadError)
Add if not in Set, error message if
Error: Main class not found or could not be loaded
[Error] The app is not displayed in the production environment