MAC : No available formula with the name "brew-cask" - homebrew

Trying to install brew-cask after tapping caskroom/cask,
brew tap caskroom/cask
brew install brew-cask
But getting error,
$ brew install brew-cask
Updating Homebrew...
Error: No available formula with the name "brew-cask"
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
This similarly named formula was found:
brew-cask-completion ✔
To install it, run:
brew install brew-cask-completion ✔
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
Tried brew cleanup, untapped caskroom/cask and reinstallation of brew-cask but no luck.
I installed, brew-cask-completion using brew install brew-cask-completion. And read somewhere brew-cask is deprecated. So what is the solution. I ignored it and installed the java open sdk. My question is, is it going to be a problem in future if I don't install it?
Thanks in advance!

It happens because of corrupted core installation, actually you will give this error for installing any packages, you should fix the with:
rm -fr $(brew --repo homebrew/core)
Then install what ever you want, for me:
brew intall deno

Try reinstalling it with these commands in this order:
brew uninstall brew-cask
brew untap caskroom/cask
brew tap caskroom/cask
brew install brew-cask

Related

Install azure cli via brew not working on mac m1

I am trying to install azure cli on to my mac M1 and getting these issues....
brew install azure-cli
fatal: Could not resolve HEAD to a revision
Warning: No available formula with the name "azure-cli".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
It was migrated from homebrew/cask to homebrew/core.
I have tried uninstalling and reinstalling brew and upgrading everything that I could find from hours of google searches nothing seems to work for me
After trying many thing things this worked for me...
rm -rf $(brew --repo homebrew/core)
brew tap homebrew/core
For M1 with Monterey, this worked for me:
arch -x86_64 brew update && arch -x86_64 brew install azure-cli

New MacBook Homebrew Install Issue

I have a Macbook Pro that has an M1 Chip that is causing issues trying to install Homebrew. I have followed the steps in this article: https://mac.install.guide/homebrew/3.html but when I get to the Homebrew install and I type brew in the terminal I get this
Example usage:
brew search TEXT|/REGEX/
brew info [FORMULA|CASK...]
brew install FORMULA|CASK...
brew update
brew upgrade [FORMULA|CASK...]
brew uninstall FORMULA|CASK...
brew list [FORMULA|CASK...]
Troubleshooting:
brew config
brew doctor
brew install --verbose --debug FORMULA|CASK
Contributing:
brew create URL [--no-fetch]
brew edit [FORMULA|CASK...]
Further help:
brew commands
brew help [COMMAND]
man brew
https://docs.brew.sh
Shouldn't it tell me what version of Homebrew I have and that it's installed?
I am trying to set up my Homebrew so that I can use it with git. I am trying to do brew install git and brew install git-lfs but I get the below error messages when I try to do that.
fatal: Could not resolve HEAD to a revision
Warning: No available formula with the name "git".
==> 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...
Error: No formulae found in taps.
Shouldn't it tell me what version of Homebrew I have and that it's installed?
To find the installed version, use the -v option.
% brew -v
Homebrew 3.6.0
Homebrew/homebrew-core (git revision e5722d08e47; last commit 2022-09-09)
Homebrew/homebrew-cask (git revision 0dc06a0f09; last commit 2022-09-09)
fatal: Could not resolve HEAD to a revision
You will need to reinstall, and make sure it uses /opt/homebrew because you are on an M1.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
There shouldn't be any errors displayed when this runs.

Unistall error using home-brew -> error using brew prune

I have Paste installed and want to uninstall it, currently running macOS High Sierra.
I have tried using the $ brew uninstall Paste and it gets returned with Error: No such keg: /usr/local/Cellar/paste.
After that I used $ brew update of which everything is up-to-date.
So after that I used $ brew doctor which returned
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Broken symlinks were found. Remove them with `brew prune`:
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuPro-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuPro-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuProN-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuProN-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuStd-W8
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuStdN-W8
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMaruPro-W4
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMaruProN-W4
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinPro-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinPro-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinProN-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinProN-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraginoSansGB-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraginoSansGB-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuGo-Bold
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuGo-Medium
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuMin-Demibold
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuMin-Medium
However, when I try and use $ brew prune I get returned with
Error: Permission denied # unlink_internal - /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuPro-W3
Can anyone help with this issue?
Simply run:
brew uninstall paste
You're getting the error: No such keg: /usr/local/Cellar/pastewhenbrew uninstall Past because there are no brew formulae installed or in the official Homebrew repository named paste.
brew install paste
Error: No available formula with the name "paste"
I guess you've installed it using cask:
brew cask install paste
If you try to uninstall it using brew you'll get that error:
brew uninstall Paste
Error: No such keg: /usr/local/Cellar/paste
To uninstall paste simply use brew cask instead:
brew cask uninstall paste

Why can't brew find a specific known formula?

I'm trying to install bazel on my mac (10.11.5).
I can see that it is available through brew:
http://braumeister.org/formula/bazel
But when I run "brew install bazel", I get this:
Error: No available formula for bazel
Searching formulae...
Searching taps...
Why is this?
In my case, Homebrew was already up-to-date after running brew update and I still received the same error messages as the OP when trying to install xdebug:
$ brew update
Already up-to-date.
$ brew install php70-xdebug
Error: No available formula with the name "php70-xdebug"
Using Mark's suggestion from the comments on OP solved the problem:
$ brew search xdebug
homebrew/php/xdebug-osx homebrew/php/php70-xdebug
So now, running $ brew install homebrew/php/php70-xdebug, Homebrew found and installed the package.
You should update your brews, because it is indeed available. Run
brew update
brew install bazel
and then it should work.

How to uninstall Homebrew Cask

I installed Homebrew Cask for kicks as described at http://caskroom.io/. It boils down to the following command:
$ brew install caskroom/cask/brew-cask
$ brew tap caskroom/versions
Homebrew Cask installed and everything was fine. Then I uninstalled Homebrew Cask like so:
$ brew untap caskroom/versions
$ brew uninstall brew-cask
Here are the current taps:
$ brew tap
homebrew/versions
Yet I see stuff from Cask when searching for items that wouldn't be part of Homebrew itself (like Graphical programs, aText, Fantastical etc.):
$ brew search atext
Caskroom/cask/atext
Though it doesn't install (as expected):
$ brew install atext
Error: No available formula for atext
Searching formulae...
Searching taps...
Caskroom/cask/atext
So the question is why does brew search Caskroom/cask and how do I get rid of it (I don't want Homebrew telling me it has aText, for example, when it can't install it)?
I am running Mac OS X Yosemite.
For the current version of Brew:
$ brew uninstall --cask yed
For older versions of Brew:
$ brew cask uninstall yed
the result:
==> Removing App symlink: '/Users/user/Applications/yEd.app'
As of Homebrew version 0.9.5, it appears that brew search will find items in Caskroom/cask/ without actually having Homebrew Cask installed. You can also install them, but this will actually install brew-cask as a dependency along the way.
Try:
brew install Caskroom/cask/atext
Command the terminal to "untap" at the prompt [MacOS Catalina 10.15.2]
Run
brew untap homebrew/cask-fonts
Expected output
Untapping homebrew/cask-fonts...
Untapped 1571 casks (1,713 files, 11.4MB)

Resources