-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't install both docker CLI and Docker app #146078
Comments
Based on https://www.weplayinternet.com/posts/error-it-seem-there-is-already-a-binary/ I tried to do the opposite, and it sort of "works"
But I am not sure it is a good idea to force overwriting. |
Hi @osalbahr, thanks for opening this. We should modify the cask to clarify that the cask and the formula are incompatible. Thank you for providing the extensive output. I will admit that given its length, it's a bit difficult to follow and understand the current state of the system. I think the best move would be to uninstall both the formula and the cask. Then just install the cask. The cask already includes the CLI tools. At some point in the set up you're asked where to install them. You can also check your settings: Just check where they are installed. If they're not in |
The caveat does say the following:
I am not sure what "If your CLI tools were symlinked" means, I assumed it's saying if that's something I already did, which I did not. Also, the directory does not exist:
I am not sure if the setup is something that happens after installing the cask, and opening the app. Edit: Thank you for clarifying. The app does install the CLI tools in /usr/local/bin by default, which is in my $PATH. Since this only happens after opening the app, I think the current caveat needs to be expanded to clarify that
|
I'd like to add that after running
and opening the Docker app, the setup page is skipped. The app thinks I already have gone through the setup, even though It was only after uninstalling Docker in the app itself, and reopening it, that the setup page appears. I'm not sure what the difference is between how Docker uninstalls itself and how It looks like even in the Settings the app thinks that I had to either switch to User (and then back to System), or through the Uninstall. Note: I re-did the commands for diagnostic purposes. I do have both the |
Thank you for following up! Docker has additional files that are not removed by uninstall. In brew, you can remove them by appending Since it sounds like the issue was resolved, I'll be closing this! Let me know if that's not the case. |
Yes, the issue is resolved for me, via a workaround. I think this issue remains until a) clear brew output that the formula and cask of the same name are incompatible, and b) clarification on how to run the docker command after installing the cask, and c) resolving the incomplete uninstall. I don’t know brew’s philosophy for handling such situations, but I don’t feel like a workaround solved it. Especially that this issue dates to while ago in multiple forums. That’s just my opinion. for example: https://github.com/orgs/Homebrew/discussions/3471 and this 6y https://stackoverflow.com/questions/40523307/brew-install-docker-does-not-include-docker-engine |
Thanks for the feedback!
|
I can see that https://formulae.brew.sh/cask/docker lists docker as a "Conflicts with". However, the |
@razvanazamfirei is there a reason why it would https://github.com/Homebrew/homebrew-core/blob/master/Formula/docker.rb#L28 It seems strange that, in both, downloading happens regardless of any checks. Could it be an issue of checking order? Would it be possible to check if a For example, when I
In contrast:
Doesn't recognize the fail was because of the conflict, even though https://formulae.brew.sh/cask/docker lists docker-completion as a conflict. |
I got the same ambiguous error message with
|
Out of curiosity, why did you close this issue even though it hasn't been resolved yet? |
Hi @osalbahr, I closed it because the original issue was related to you not being able to install both the docker formula and the docker cask since the two are not compatible. After a clean reinstall, you had access to the CLI tools in the docker cask. That aspected seemed to be resolved. Thank you again for following up with additional information and for your attempts to parse this out. It's very much appreciated! In terms of checking for conflicts, the behavior you mentioned has already been noted in #12822. I've reopened this for now in case other maintainers want to chime in, but I don't have anything else to add on that. |
Hi @razvanazamfirei, thank you for clarifying! Do you know if maintainers have a plan on how conflicts between a cask and a formula should be addressed? Or what issues make the check more complicated than it might seem? I’d be interested to read up more on it, and hopefully help with a fix. I opened a PR (#146192) to add to the docker cask caveat, hopefully minimizing this issue for the meantime. Is there a way I can locally see how the output of installing the cask would look if the PR gets approved? |
The added caveat should clarify how to add the CLI tools after installing the cask. Fixes [Homebrew#46078 (comment)](Homebrew#146078 (comment))
Verification
--force
.brew update-reset && brew update
and retried my command.brew doctor
, fixed as many issues as possible and retried my command.Description of issue
I am unable to
brew
bothdocker
and--cask docker
to have both the CLI tool and the Docker app. Normally, I'dopen -a docker
to get the docker daemon running, and then usedocker
normally. I am unable to do that withbrew install --cask docker
due to conflicting files.See Homebrew/homebrew-core#129609 for previous attempts.
Note: installing Docker from https://www.docker.com/ "just works":
Here is the full output of all the commands I tried since starting this issue:
Command that failed
brew install --cask docker
Output of command with
--verbose --debug
Output of
brew doctor
andbrew config
Output of
brew tap
The text was updated successfully, but these errors were encountered: