my macos is big sur try to install openssl
brew install openssl
Warning: The post-install step did not complete successfully
You can try again using:
brew postinstall openssl@1.1
==> An exception occurred within a child process:
Errno::EINTR: Interrupted system call @ apply2files - /private/tmp/20210702-73435-1yeffpb
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:207:in `unlink'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:207:in `unlink'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:162:in `close'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:168:in `close!'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/openssl@1.1.rb:156:in `macos_post_install'
/usr/local/Homebrew/Library/Homebrew/extend/os/mac/on_os.rb:8:in `on_macos'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/openssl@1.1.rb:115:in `post_install'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1101:in `block (2 levels) in run_post_install'
/usr/local/Homebrew/Library/Homebrew/formula.rb:924:in `with_logging'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1100:in `block in run_post_install'
/usr/local/Homebrew/Library/Homebrew/utils.rb:550:in `with_env'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1089:in `run_post_install'
/usr/local/Homebrew/Library/Homebrew/postinstall.rb:22:in `<main>'
For Big Sur Users
This is because the MACOS disabled this system call You can test first type below command in terminal
csrutil status
by default it is enabled you can turn it off follow this vedio
https://www.youtube.com/watch?v=pekCPQn5fMs
after turned off check again you can see
System Integrity Protection status: disabled.
and the problem should be solved