Search code examples
macosopensslhomebrew

Why can't I install openssl on my Mac by homebrew?


I run the following code, which show that there are no openssl repo find in brew.

My Mac is macOS Big Sur 11.3.1

% brew install openssl
Updating Homebrew...
fatal: Could not resolve HEAD to a revision
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 1 cask.

Warning: No available formula or cask with the name "openssl".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
This formula was found in a tap:
homebrew/portable-ruby/portable-openssl
To install it, run:
  brew install homebrew/portable-ruby/portable-openssl

UPDATE

Seems that my brew can't install ccache either like the following. It is more of a brew issue?

brew install ccache

Solution

  • The following commands help

    cd /usr/local/Homebrew/Library/Taps/homebrew/
    rm -rf homebrew-core
    git clone https://github.com/Homebrew/homebrew-core.git