linking shared-library libruby.3.1.dylib ld: library not found for -lcapstone clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [libruby.3.1.dylib] Error 1
As explained in Failed to install ruby 3.1.0 on M1 · Discussion #1933 · rbenv/ruby-build, two approaches are possible:
# Assuming Fish-shell, and that the two following directories are indeed present
# Adapting to Bourne affine shells is left as an exercise 😄
set -gx LDFLAGS "-L/opt/homebrew/opt/capstone/lib"
set -gx CPPFLAGS "-I/opt/homebrew/opt/capstone/include"
# relaunch the install process with installation manager
# rbenv install 3.1.0
# asdf install ruby 3.1.0
cppflags="-DRUBY_DEBUG" is specified":brew uninstall bloaty
brew uninstall capstone
# Adapt to fit local environment:
set -gx RUBY_CFLAGS "-w"
rbenv install 3.1.0
# asdf install ruby 3.1.0
And run the installation again by providing:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With