homebrew-cask icon indicating copy to clipboard operation
homebrew-cask copied to clipboard

Better instructions for: Cask xxx is unavailable: No Cask with this name exists.

Open muescha opened this issue 6 years ago • 12 comments

Description of feature/enhancement

what i do:

  • brew cask outdated
  • brew cask list

what i see:

brew cask outdated
Error: Cask 'betterzipql' is unavailable: No Cask with this name exists. 

(all?) brew commands fail now

what i expected

  • commands should work normalwly
  • the missing cask should result in an warning but not breaking the command
  • i miss an instruction or an hint or a link to an info page with a "How to resolve" instructions
  • an way to remove the cask / program with the brew command to get brew cask working again

Justification

sometimes there is an cask deleted, and always people start to file an issue about this and they have no clue how to resolve this breaking the workflow

Example use case

betterzipql is removed and now i get the error messages above and can not use the brew command anymore

muescha avatar Oct 21 '19 13:10 muescha

is this issue the right place here or should it go to the homebrew core repo?

muescha avatar Oct 25 '19 18:10 muescha

similar issues:

  • #73271 Cask 'kdiff3' is unavailable: No Cask with this name exists
  • #72562 brew cask upgrade fails with "No Cask with this name exists"
  • #69369 Error: Cask 'sshfs' is unavailable: No Cask with this name exists.
  • #58352 "No Cask with this name exists." after running resolution for "Token in Header Line" Error
  • #57911 I keep getting Cask 'citrix-workspace' is unavailable
  • #50411 Error: Cask 'hexchat' is unavailable: No Cask with this name exists
  • #49510 Cask 'google-chrome-canary' is unavailable
  • #42527 brew cask list` fails if previously installed but now unavailable cask
  • #40371 Brew Cask Reports "Error: Cask 'avast' is unavailable: No Cask with this name exists." on Every Command
  • #40096 Report "No Cask with this name exists." After uninstall and install jce-unlimited-strength-policy
  • #36387 brew cask list command not work
  • #36164 Error when running brew cask list
  • #36387 brew cask list command not work

muescha avatar Dec 05 '19 02:12 muescha

when i do brew cask install iterm2 the same issues has

jacksun111 avatar Feb 08 '20 06:02 jacksun111

me,too. Cask 'android-platform-tools' is unavailable: No Cask with this name exists.

geekhch avatar Mar 12 '20 03:03 geekhch

Please avoid “me too” posts. We’re already aware this is a problem; replies stating “this also happens to me” without extra information don’t bring us closer to a resolution.

vitorgalvao avatar Mar 12 '20 18:03 vitorgalvao

Suggest executing brew untap $xxx$ && brew tap $xxx$, where $xxx$ can represent any taps you have trouble with, like homebrew/cask.

hackroid avatar May 03 '20 12:05 hackroid

I was able to fix my issue by removing directories from /usr/local/Caskroom.

nijikon avatar Nov 10 '20 14:11 nijikon

The last comment helped: Remove the cask from /usr/local/Caskroom. It would be nice if the error message could suggest this as a remedy. Or if the code could handle the case of removed casks better.

schlomo avatar Nov 26 '20 13:11 schlomo

It would be nice if the error message could suggest this as a remedy.

There are multiple problems caused by the same underlying issue; adding workaround messages to all of them is a bad solution.

Or if the code could handle the case of removed casks better.

That’s the point of an open issue, to track the problem so it’s eventually fixed. PRs are welcome.

vitorgalvao avatar Nov 26 '20 14:11 vitorgalvao

The last comment helped: Remove the cask from /usr/local/Caskroom. It would be nice if the error message could suggest this as a remedy. Or if the code could handle the case of removed casks better.

This helped me. I believe this issue is triggered when updating the OS and the item is no longer compatible with the OS and is moved out of the folder it was originally residing in. This was the case for the betterzipql and another item I had when updating to BigSur recently.

PeterLi avatar Feb 24 '21 22:02 PeterLi

For me it started with a brew update about a week ago. First, I was getting

Error: Cask 'font-dejavu-sans' is unavailable: No Cask with this name exists.

and I was unable to run any brew commands, including brew doctor. The suggestion of manually removing font-dejavu-sans from /usr/local/Caskroom is the only thing that seems to have done anything, and appears to have fixed that issue.

However, then things got zanier:

Error: Cask 'java' definition is invalid: Token '{:v1=>"java"}' in header line does not match the file name.

Again, removing the java cask fixed the issue. I hope simply rm-ing a couple of casks won't cause further knock-on problems?

telamonian avatar Mar 15 '21 16:03 telamonian

I hope simply rm-ing a couple of casks won't cause further knock-on problems?

It won’t (shouldn’t).

vitorgalvao avatar Mar 15 '21 19:03 vitorgalvao