Error: When running command to list all downloadable cask apps - terminal

Cask used to run fine but now I'm faced with error when I try:
brew search --casks
I get the following error:
Error: Invalid usage: This command requires at least 1 text or regex argument.
I may have deleted a file which was in my home directory which looked out of place and may have been some file cask needed. Could this have been the problem?
I tried reinstalling casks but it didn't solve the issue. Brew doctor commands didn't return any problem

Related

How to solve: "Cask 'caskroom' is unavailable: No Cask with this name exists."

When I try to run brew doctor I get the error message below with no other details.
brew doctor
Error: Cask 'caskroom' is unavailable: No Cask with this name exists.
However I am able to run brew list and do not see any pkg named "caskroom". I also was able to run "update" and "upgrade" and they seemed to complete successfully.
Is there a "verbose" mode which would give me more information about where this error is occurring or is there a way I can manually remove this reference to "Cask 'caskroom'?

Homebrew Portable Ruby Error macOS 10.14.6

Homebrew suddenly stopped working, when i run any brew command i get following output:
==> Downloading https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz
Already downloaded: /Users/<user>/Library/Caches/Homebrew/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz
/usr/local/Homebrew/Library/Homebrew/cmd/vendor-install.sh: line 123: /usr/bin/cut: cannot execute binary file
Error: Checksum mismatch.
Expected: b065e5e3783954f3e65d8d3a6377ca51649bfcfa21b356b0dd70490f74c6bd86
Actual:
Archive: /Users/<user>/Library/Caches/Homebrew/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz
To retry an incomplete download, remove the file above.
Error: Failed to upgrade Homebrew Portable Ruby!
I already tried to remove the file portable-ruby-2.6.3_2.yosemite.bottle.tar.gz but it doesn't work and i couldn't find any helpful information about this error on Google.
Any help is appreciated.
There are several things that I can think of for your situation.
Your output has yosemite identifier, to be clear, MacOS Yosemite is actually 10.10.x, it is not in the current/latest homebrew support list, and also different from 10.14 Mojave in your problem title. So if you are actually using Mojave, you can keep your brew up to date and reinstall ruby.
The latest Ruby formula is actually 2.7.x, you might want to reinstall/upgrade (brew reinstall ruby/brew upgrade ruby).
In all, if you still run into an issue, please attach the outputs of brew config and brew doctor for troubleshooting.
Try brew update-reset and then try brew upgrade.
It's set portable-ruby-2.6.3_2.yosemite.bottle.tar.gz was already downloaded so I removed it and it went through henceforth.

Non-existent oh_my_zsh causing issues

I seem to not be able to get away from oh_my_zsh, which is causing errors.
When I run npm install, I am getting the error: zsh: command
not found: npm.
When I check which version of node I am running, I get zsh: command
not found: node. Node is definitely installed.
I tried uninstalling oh_my_zsh using uninstall_oh_my_zsh and
trying npm install again. I again get the error zsh: command not found: npm.
I tried uninstalling oh_my_zsh with Homebrew. I got the error zsh: command not
found: brew.
I tried restarting Terminal, and visually verified oh_my_zsh is not installed. I still get these errors.
I tried reinstalling oh_my_zsh, using sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)". Still get zsh: command not found: node
I don't have a problem with oh_my_zsh (or homebrew); I actually like it. I used to have a work around. I have not installed anything recently.
eta: In addition to this, I've tried updating homebrew, thinking that there was some issue with Homebrew. But ultimately error when I using Homebrew is
Error: /usr/local/opt/pkg-config not present or broken. Please reinstall pkg-config.
Apparently Homebrew was able to update Auto-updated Homebrew! and then started to clean up packages and started to upgrade node.
I got the following Caveats and then the error.
This formula is keg-only, which means it was not symlinked into /usr/local,
macOS provides libicucore.dylib (but nothing else).
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.zshrc
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/icu4c/lib
CPPFLAGS: -I/usr/local/opt/icu4c/include
==> Summary
🍺 /usr/local/Cellar/icu4c/60.2: 249 files, 68.2MB, built in 6 minutes 47 seconds
==> Installing node
Error: /usr/local/opt/pkg-config not present or broken
Please reinstall pkg-config. Sorry :(
Solution: Apparently node wasn't installed or not installed correctly. I used the package installer from nodejs.org, not the Homebrew installation, to install node. npm install, node -v work as they should. I do get warnings when I run brew doctor, including mentions of node headers, but I will ignore them until something stops working again.

Brew + suite-sparse421

I have installed brew on OSX and I have installed successfully several things.
However when I try to install suite-sparse421 (hard constraint on the version):
brew tap homebrew/versions
brew install suite-sparse421
I get the following error:
Error: No available formula with the name "suite-sparse421"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
Running brew doctor shows no problem (Your system is ready to brew.)
Running brew update shows no problem (Already up-to-date.)
Any idea?
Have a look at this
https://github.com/Homebrew/homebrew-science/blob/master/suite-sparse.rb
Homebrew-science/suite-sparse.rb has updated it url to download the 4.5.3 package, "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.5.3.tar.gz"
If you want a specific version , why not download and build on your own.
The commands to build are pretty self explanatory there in the rb script.
As you can see in the error message there’s no formula named suite-sparse421. There’s nothing wrong with your Homebrew installation; it just doesn’t exist. See this other SO answer on how to install a previous version of a formula.
In addition to the previous right answers, the formula suite-sparse421 was removed. And all archived versions of SuiteSparse are listed on the official website.

brew install cassandra12 fails on Mac

When I try to install cassandra12 on my Mac using:
brew install cassandra12
It fails with:
Error: No available formula with the name "homebrew/versions/cassandra12"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
Updating, uninstalling and re-installing brew didn't help either. Can somebody help me with how to fix this issue?
Note: 'brew search cassandra' shows cassandra21 and cassandra22. I need cassandra12 specifically.
Cassandra 1.2 was removed from home-brew versions about a month ago.
zzatking posted the following on the pull request
If anyone really needs a version that was removed due to this pull
request, you can find it by following these steps:
Click the commit above related to your software (e.g. cassandra*)
Find the formula you desire (e.g. cassandra12.rb)
Click "View" for that formula
Click "Raw" for the source
Copy the URL
Run brew install <URL>

Resources