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

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

try this put it in terminal and run:
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

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

try this:
git -C $(brew --repo homebrew/core) checkout master
^This should be the fix anytime you see the error "Could not resolve HEAD to a revision, as you may find at the bottom of the output when running "brew doctor"

Related

How to update cocoapod version using brew

I've installed cocoapods by this - https://apple.stackexchange.com/questions/418222/installing-cocoapods-to-macos-catalina/418230#418230
It istalled cocoapods v1.5.2. Now I want to update the version to the latest v1.10.0.
So I've used -
brew upgrade cocoapods
I've also tried this -
brew install cocoapods#1.10.0
But I'm getting -
Error: This command updates brew itself, and does not take formula names.
Use `brew upgrade cocoapods` instead.
Fahims-Mac-mini:~ fahimrahman$ brew upgrade cocoapods
Fahims-Mac-mini:~ fahimrahman$ brew upgrade cocoapods
Fahims-Mac-mini:~ fahimrahman$ brew install cocoapods#1.10.0
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "cocoapods#1.10.0".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
Also tried this -
sudo gem install cocoapods
but still is not working on my device. So How can I update the cocoapods version using brew?
I had the same issue and resolved. This was bugging me, since in the website https://formulae.brew.sh/formula/cocoapods latest stable is 1.10.1 but still brew installed me1.5.4
Figure out The problem by using
brew doctor
I got the below warning.
Some taps are not on the default git origin branch and may not receive
updates. If this is a surprise to you, check out the default branch with:
git -C $(brew --repo homebrew/core) checkout master
Then, as per suggestion, I did. (Fix the related issues which comes for you)
git -C $(brew --repo homebrew/core)
Then, brew install cocoapods installed the latest version for me.
Hope it solves.
You can't do much with homebrew.
Homebrew allows installing v1.10.1 only
In my case fix this issue by updating ruby to 2.7 to install cocoapods v1.10.0.
rvm install ruby-2.7
Note: Use the specific version of ruby as per your macOS compatibility
I uninstalled brew uninstall cocoapods then reinstalled by sudo gem install cocoapods , it worked.
For me brew upgrade cocoapods shows Warning: cocoapods 1.11.2_2 already installed, so I've unistalled them with brew uninstall cocoapods and the install again with brew install cocoapods and now pod --version shows 1.11.3
I used brew upgrade cocoapods and it works just fine. Take a look at these terminal screenshots. brew upgrade cocoapods
upgrading cocoapods

Homebrew Error: No formulae found in taps

I'm trying to install paramiko on my MacBook Pro (OSX Sierra) without going through Xcode because I'm too lazy to install Xcode honestly.
When trying to run:
brew install paramiko
I get:
Error: No available formula with the name "paramiko"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
I've tried untapping home-brew via:
brew untap homebrew
And I get:
Error: No available tap homebrew/php.
Also tried:
brew tap --repair
brew update
Nothing besides:
Updated 1 tap (caskroom/cask).
No changes to formulae.
If I have to go through Xcode, that's fine but I feel the issue here is not the installation process but something weird with the taps...
This worked for me.
run brew doctor
Warning: Some taps are not on the default git origin branch and may
not receive updates. If this is a surprise to you, check out the
default branch with: git -C $(brew --repo homebrew/core) checkout
master
then run git -C $(brew --repo homebrew/core)
Run this command:
git -C $(brew --repo homebrew/core) checkout master
this will switch to master, then run
brew doctor
this should run without any error.
If there is no error you can install anything with brew install
ex: brew install wget
I ran:
brew doctor
which gave me as first warning:
Warning: Homebrew/homebrew-core was not tapped properly! Run:
rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-core"
brew tap homebrew/core
Running those 2 commands above solved the problem for me.
I was also facing the same issue when installing Node via brew.
I fixed it by running two commands:
$ brew doctor
This shows me this warning:
Warning: Homebrew/homebrew-core was not tapped properly! Run:
rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-core"
brew tap homebrew/core
Then I ran these two commands to fix the warning:
$ rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-core"
$ brew tap homebrew/core
And then I tried installing Node:
$ brew install node
It worked.
See if the following approach in the following link helps.
Depending upon your pip/python/xcode version, brew may not work in installing python or python3.
I installed Python3 binary .pkg for Mac from their site, installed it on Mac.
Then, opened a new Terminal window and did:
which python3 && python3 --version && which pip3 && pip3 --version
pip3 install paramiko
brew or pip - install credstash - errors - No named formulae found in taps / OSErr six-1.4.1-py2.7.egg-info operation not permitted
Apparently, I also had this issue, I'm a developer.
I want to develop an OS with a command known as i686-elf-gcc, but with homebrew it doesn't work. So, use this:
brew doctor
And a warning will show up:
Warning: Homebrew/homebrew-core was not tapped properly! Run:
rm -rf "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core"
brew tap homebrew/core
So run these:
rm -rf "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core"
brew tap homebrew/core
After that, I tried installing my package:
brew install i686-elf-gcc
And, it worked, it should also work for you.
sudo ln -s /usr/lib/dart/bin/pub /usr/bin/pub
sudo ln -s /usr/lib/dart/bin/dart2js /usr/bin/dart2js
git -C $(brew --repo homebrew/core) checkout master
this command helps

Get error while cask, brew-cask

I want install search engine elasticsearch in OS X 10.11.6
I read some blog
in my command line
brew install elasticsearch
and it show error(needs java)
elasticsearch: Java 1.7+ is required to install this formula.
You can install with Homebrew Cask:
brew install Caskroom/cask/java
You can download from:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Error: An unsatisfied requirement failed this build.
I flow this blog's solution
brew tap caskroom/cask
and show
Warning: Tap caskroom/cask already tapped.
second command
brew install brew-cask
it show error
Error: No available formula with the name "brew-cask"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
This formula was found in a tap:
Caskroom/cask/brew-cask-completion
To install it, run:
brew install Caskroom/cask/brew-cask-completion
==> You haven't updated Homebrew in a while.
A formula for brew-cask might have been added recently.
Run `brew update` to get the latest Homebrew updates!
and i install java
brew cask install java
but cask doesn't install
==> brew cask install Caskroom/cask/brew-cask-completion
Error: Unknown command: cask
and Some blog give me some advice
brew upgrade brew-cask
it show error
Error: No available formula with the name "brew-cask"
if fact I can't understand why my mac can't find cask...
please somebody helpme
Problem Solved I need to brew update
brew update
Try this works for me.
I thought it's brew update install package command,
brew install --cask java

No such keg: /usr/local/Cellar/git

I have been struggling with this for a few hours. I am on a Mac using Yosemite. I had homebrew installed, and was using git just fine. I tried doing $git add -i and I got this error:
Can't locate Git.pm in #INC (#INC contains:
So I followed the instructions here:
Can't locate Git.pm in #INC
$brew uninstall git worked fine, but after I tried to $brew install git I've been stuck in a terrible cycle.
% brew install git
Error: git-git already installed
To install this version, first `brew unlink git'
% brew unlink git
Error: No such keg: /usr/local/Cellar/git
% brew link git
Error: No such keg: /usr/local/Cellar/git
% git --version
git version 1.9.3 (Apple Git-50)
% brew upgrade git
==> Upgrading 1 outdated package, with result:
git 2.2.2
Error: /usr/local/Library/LinkedKegs/git is not a valid keg
% brew install git
Error: git-git already installed
To install this version, first `brew unlink git'
%
I just want to get homebrew & git back to normal and linked to the correct repo again. I'm really rough around the edges at this stuff, so any help would be greatly appreciated!
Give another go at force removing the brewed version of git
brew uninstall --force git
Then cleanup any older versions and clear the brew cache
brew cleanup -s git
Remove any dead symlinks
brew cleanup --prune-prefix
Then try reinstalling git
brew install git
If that doesn't work, I'd remove that installation of Homebrew altogether and reinstall it. If you haven't placed anything else in your brew --prefix directory (/usr/local by default), you can simply rm -rf $(brew --prefix). Otherwise the Homebrew wiki recommends using a script at https://gist.github.com/mxcl/1173223#file-uninstall_homebrew-sh
Had a similar issue while installing "Lua" in OS X using homebrew. I guess it could be useful for other users facing similar issue in homebrew.
On running the command:
$ brew install lua
The command returned an error:
Error: /usr/local/opt/lua is not a valid keg
(in general the error can be of /usr/local/opt/ is not a valid keg
FIXED it by deleting the file/directory it is referring to, i.e., deleting the "/usr/local/opt/lua" file.
root-user # rm -rf /usr/local/opt/lua
And then running the brew install command returned success.
Os X Mojave 10.14 has:
Error: The Command Line Tools header package must be installed on
Mojave.
Solution. Go to
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
location and install the package manually. And brew will start working and we can run:
brew uninstall --force git
brew cleanup -s git
brew cleanup --prune-prefix
brew install git

brew install libyaml ERROR

$ brew install libyaml
==> Downloading http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
Already downloaded: /Library/Caches/Homebrew/libyaml-0.1.4.tar.gz
==> ./configure --prefix=/usr/local/Cellar/libyaml/0.1.4
==> make install
Warning: Could not link libyaml. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link libyaml'
==> Summary
🍺 /usr/local/Cellar/libyaml/0.1.4: 7 files, 336K, built in 9 seconds
OS X 10.8.2
how do I fix this problem?
what should I do ?
Start with brew doctor which will show you errors with your brew setup.
You might see something like this: "Warning: /usr/local/lib/pkgconfig isn't writable."
It will give you the advice that: "You should probably chown /usr/local/lib/pkgconfig".
This means: sudo chown {your-user-name} /usr/local/lib/pkgconfig
Then you will need to link the files with this: brew link libyaml
If this does not work hopefully the output of brew doctor will give you enough to continue the search.

Resources