Open rikhuijzer opened 11 months ago
It seems like there were some lingering files from a previous installation of Docker that were causing conflicts during the reinstallation process. To resolve this issue, you successfully identified and removed these files.
This is a known issue that it's unclear how to be solved. There may already be a homebrew/cask issue for this CC @Homebrew/cask for help triaging.
Need to decide how best to handle this e.g. what symlinks to install/skip/etc.
docker
Formula has a dependency on docker-completion
Formula, both of which conflict with docker
Cask.
The failures are coming from docker-completion
, which won't be removed until brew autoremove
or manually uninstalling.
Would say this is related to https://github.com/Homebrew/homebrew-cask/issues/12822 as we do specify the conflict but it is only documentation (e.g. https://formulae.brew.sh/cask/docker#default) rather than providing a useful error when user tries following:
$ brew install docker
$ brew install --cask docker
providing a useful error
not sure whether this conversation should be here or there but: I don't think this should be an error at all. Instead, either the formula or cask should not be linked and the user warned.
not sure whether this conversation should be here or there but: I don't think this should be an error at all. Instead, either the formula or cask should not be linked and the user warned.
Was basing this on how formulae are currently handled, e.g.
Error: Cannot install bash-completion because conflicting formulae are installed.
bash-completion@2: because each are different versions of the same formula
Please `brew unlink bash-completion@2` before continuing.
Unlinking removes a formula's symlinks from /opt/homebrew. You can
link the formula again after the install finishes. You can --force this
install, but the build may fail or cause obscure side effects in the
resulting software.
EDIT: Though we may be handling the reverse situation for Cask-Formula conflict: https://github.com/Homebrew/brew/blob/dde0411e02d285e0dda42a450bcd4e9556b99464/Library/Homebrew/formula_installer.rb#L973-L982
Though we may be handling the reverse situation for Cask-Formula conflict:
Yeh, we should do something similar to that, I think, but expand the definitions so that they don't need to have the same name.
Was basing this on how formulae are currently handled, e.g.
I think this makes sense for formulae that are often mutually exclusive. For formula/cask combos when it seems many people often want both: it kinda sucks.
Please someone do something to prevent users from doing brew install docker
and then eventually realizing they needed brew install --cask docker
. ~Absolutely nobody wants the former~. This will just trip up thousands of devs and waste their time, as it's a pretty reasonable thing to expect to work. (IIRC homebrew doesn't require the use of --cask any more).
Please someone do something to prevent users from doing brew install docker and then eventually realizing they needed brew install --cask docker. Absolutely nobody wants the former.
I want the former since I'm using a different container runtime and a lot of tools hardcode the docker command.
Please someone do something to prevent users from doing brew install docker and then eventually realizing they needed brew install --cask docker. Absolutely nobody wants the former.
I want the former since I'm using a different container runtime and a lot of tools hardcode the docker command.
Same here. The docker
CLI is nice. I prefer using an open-source container runtime, however, and that's not what you get with the Docker cask.
My bad.
But I suspect my main point still stands -- there's a sharp edge here that could maybe be smoothed over.
Usually brew install foo
does the same as brew install --cask foo
, right?
Is it possible for the Homebrew team to do something so that devs don't install the wrong thing by mistake and then have to dig out this issue to fix it?
Shouldn't the package be named docker-cli
to make a clear disambiguation?
Usually
brew install foo
does the same asbrew install --cask foo
, right?
No. It's usually brew install --formula
if there's two with the same name.
Shouldn't the package be named
docker-cli
to make a clear disambiguation?
No. The cask could be renamed if we want to go down that route. docker-desktop
or something.
No. It's usually brew install --formula if there's two with the same name.
I know it's a breaking change, so maybe not feasible, but for me the ideal fix for this would be for brew were to error on ambiguous cask vs formula install commands. This is the way it works if a formula is available in multiple taps. That would force people to actually work out which one they wanted.
I know it's a breaking change, so maybe not feasible, but for me the ideal fix for this would be for brew were to error on ambiguous cask vs formula install commands. This is the way it works if a formula is available in multiple taps. That would force people to actually work out which one they wanted.
Yea, this maybe should've been what we did from the beginning. But this will break too many things now to change, unfortunately.
It could be optional behaviour, though. I can see people (perhaps myself included) enabling that.
Alternatively, it is something we could consider just warning and later deprecating/erroring on.
No. The cask could be renamed if we want to go down that route.
docker-desktop
or something.
This is still my favoured option, though; at least in homebrew/core and homebrew/cask we should just avoid overlapping names like we do.
Alternatively, it is something we could consider just warning and later deprecating/erroring on.
Yeah a "there is also a cask for this, if you wanted that cancel this install and do brew install --cask docker
" style warning would probably help a lot of folks.
ty! my docker broke after upgrading to Sequoia (v15.0). I can confirm that after applying all of those rm -f /path/to/file
and then brew reinstall --cask docker
that docker is back to normal.
I've tried everything to get it to work.
I manually deleted all the docker binaries in /usr/local/bin/docker* and attempted brew autoremove
started getting this error:
It seems there is already a Binary at '/usr/local/bin/hub-tool'.
curl -L -O https://raw.githubusercontent.com/docker-archive/toolbox/refs/heads/master/osx/uninstall.sh; sudo bash uninstall.sh
I'm sure I can manualyl install from the docker website but at this point I want to know why I can't get brew to work
Try brew install --cask --force docker
.
brew doctor
outputVerification
brew doctor
output" above saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
twice and am still able to reproduce my issue.brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.brew config
outputWhat were you trying to do (and why)?
I was trying to install Docker via brew in order to run Docker. With that I mean that I wanted to have Docker and the Docker engine.
What happened (include all command output)?
What did you expect to happen?
Successful installation of the Docker cask.
Step-by-step reproduction instructions (by running
brew
commands)