Skip to content
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 #129609

Closed
4 tasks done
osalbahr opened this issue Apr 28, 2023 · 1 comment
Closed
4 tasks done

Can't install both docker CLI and Docker app #129609

osalbahr opened this issue Apr 28, 2023 · 1 comment
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age

Comments

@osalbahr
Copy link
Contributor

osalbahr commented Apr 28, 2023

brew gist-logs <formula> link OR brew config AND brew doctor output

~$ brew gist-logs --cask docker
Usage: brew gist-logs [options] formula

Upload logs for a failed build of formula to a new Gist. Presents an error
message if no logs are found.

      --with-hostname              Include the hostname in the Gist.
  -n, --new-issue                  Automatically create a new issue in the
                                   appropriate GitHub repository after creating
                                   the Gist.
  -p, --private                    The Gist will be marked private and will not
                                   appear in listings but will be accessible
                                   with its link.
  -d, --debug                      Display any debugging information.
  -q, --quiet                      Make some output more quiet.
  -v, --verbose                    Make some output more verbose.
  -h, --help                       Show this message.
Error: invalid option: --cask
~$ brew gist-logs cask/docker
Error: No available formula with the name "cask/docker".
~$ brew gist-logs homebrew/cask/docker
Error: No available formula with the name "homebrew/cask/docker".
~$ brew config
HOMEBREW_VERSION: 4.0.15
ORIGIN: https://github.com/Homebrew/brew
HEAD: 763c41f006ab9b44261e313b0aaa24a047431b06
Last commit: 4 days ago
Core tap JSON: 28 Apr 07:20 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 4
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: quad-core 64-bit kabylake
Clang: 14.0.0 build 1400
Git: 2.37.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.87.0 => /usr/bin/curl
macOS: 12.6.5-x86_64
CLT: 14.2.0.0.1.1668646533
Xcode: N/A
~$ brew doctor
Your system is ready to brew.
~$ brew gist-logs docker
Error: No logs.
~$ 

Verification

  • My "brew doctor output" says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

~$ docker run alpine
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.

I know that I can run the daemon by opening the Docker app (open -a docker). So I wanted tobrew install --cask docker.

What happened (include all command output)?

Summary

~$ brew install --cask docker
==> Caveats
If your CLI tools were symlinked to $HOME/.docker/bin your path should be modified to include:

  $HOME/.docker/bin

==> Downloading https://desktop.docker.com/mac/main/amd64/106363/Docker.dmg
######################################################################### 100.0%
==> Installing Cask docker
==> Moving App 'Docker.app' to '/Applications/Docker.app'
==> Backing App 'Docker.app' up to '/usr/local/Caskroom/docker/4.19.0,106363/Doc
==> Removing App '/Applications/Docker.app'
==> Purging files for version 4.19.0,106363 of Cask docker
Error: It seems there is already a Binary at '/usr/local/share/zsh/site-functions/_docker'.

Full output

~$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
Warning: This script will remove:
/Users/osos/Library/Caches/Homebrew/
/Users/osos/Library/Logs/Homebrew/
/usr/local/Caskroom/
/usr/local/Cellar/
/usr/local/bin/brew -> /usr/local/bin/brew
Are you sure you want to uninstall Homebrew? This will remove your installed packages! [y/N] y
==> Removing Homebrew installation...
Warning: Failed to delete /usr/local/Caskroom
rm: /usr/local/Caskroom: Permission denied
Warning: Failed to delete /usr/local/Cellar
rm: /usr/local/Cellar: Permission denied
==> Removing empty directories...
Password:
==> /usr/bin/sudo /usr/bin/find /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/var /usr/local/Caskroom /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks -name .DS_Store -delete
==> /usr/bin/sudo /usr/bin/find /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/var /usr/local/Caskroom /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks -depth -type d -empty -exec rmdir {} ;
==> Homebrew uninstalled!
The following possible Homebrew files were not deleted:
/usr/local/Frameworks/
/usr/local/Homebrew/
/usr/local/bin/
/usr/local/etc/
/usr/local/go/
/usr/local/include/
/usr/local/lib/
/usr/local/mysql -> /usr/local/mysql
/usr/local/mysql-8.0.32-macos13-x86_64/
/usr/local/opt/
/usr/local/sbin/
/usr/local/share/
/usr/local/var/
You may wish to remove them yourself.

~$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password)...
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following new directories will be created:
/usr/local/Cellar
/usr/local/Caskroom

Press RETURN/ENTER to continue or any other key to abort:
==> /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Caskroom
==> /usr/bin/sudo /bin/chmod ug=rwx /usr/local/Cellar /usr/local/Caskroom
==> /usr/bin/sudo /usr/sbin/chown osos /usr/local/Cellar /usr/local/Caskroom
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Cellar /usr/local/Caskroom
==> /usr/bin/sudo /usr/sbin/chown -R osos:admin /usr/local/Homebrew
==> /usr/bin/sudo /bin/mkdir -p /Users/osos/Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Users/osos/Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown -R osos /Users/osos/Library/Caches/Homebrew
==> Downloading and installing Homebrew...
HEAD is now at 7386d4e40 Merge pull request #15316 from Homebrew/dependabot/bundler/Library/Homebrew/i18n-1.13.0
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Next steps:
- Run brew help to get started
- Further documentation:
    https://docs.brew.sh

~$ docker run alpine
-bash: docker: command not found
~$ file /usr/local/share/zsh/site-functions/_docker
/usr/local/share/zsh/site-functions/_docker: cannot open `/usr/local/share/zsh/site-functions/_docker' (No such file or directory)
~$ brew install docker
Warning: Treating docker as a formula. For the cask, use homebrew/cask/docker
==> Fetching docker
==> Downloading https://ghcr.io/v2/homebrew/core/docker/manifests/23.0.5
######################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/docker/blobs/sha256:aa59d361b28
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################### 100.0%
==> Pouring docker--23.0.5.monterey.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
🍺  /usr/local/Cellar/docker/23.0.5: 12 files, 32.5MB
==> Running `brew cleanup docker`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
~$ file /usr/local/share/zsh/site-functions/_docker
/usr/local/share/zsh/site-functions/_docker: ASCII text
~$ docker run alpine
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
~$ open -a docker
Unable to find application named 'docker'
~$ brew doctor
Your system is ready to brew.
~$ brew install --cask docker
==> Caveats
If your CLI tools were symlinked to $HOME/.docker/bin your path should be modified to include:

  $HOME/.docker/bin

==> Downloading https://desktop.docker.com/mac/main/amd64/106363/Docker.dmg
######################################################################### 100.0%
==> Installing Cask docker
==> Moving App 'Docker.app' to '/Applications/Docker.app'
==> Backing App 'Docker.app' up to '/usr/local/Caskroom/docker/4.19.0,106363/Doc
==> Removing App '/Applications/Docker.app'
==> Purging files for version 4.19.0,106363 of Cask docker
Error: It seems there is already a Binary at '/usr/local/share/zsh/site-functions/_docker'.
~$ file '/usr/local/share/zsh/site-functions/_docker'
/usr/local/share/zsh/site-functions/_docker: ASCII text
~$ file $HOME/.docker/bin
/Users/osos/.docker/bin: cannot open `/Users/osos/.docker/bin' (No such file or directory)
~$ brew doctor
Your system is ready to brew.
~$ brew update && brew update
Already up-to-date.
Already up-to-date.
~$ brew doctor
Your system is ready to brew.
~$ time brew install --cask docker
==> Caveats
If your CLI tools were symlinked to $HOME/.docker/bin your path should be modified to include:

  $HOME/.docker/bin

==> Downloading https://desktop.docker.com/mac/main/amd64/106363/Docker.dmg
Already downloaded: /Users/osos/Library/Caches/Homebrew/downloads/a2fa53b312129a06f0f442d39dc52e4aa215dd8202dccd10ade7522d8fdd9584--Docker.dmg
==> Installing Cask docker
==> Moving App 'Docker.app' to '/Applications/Docker.app'
==> Backing App 'Docker.app' up to '/usr/local/Caskroom/docker/4.19.0,106363/Doc
==> Removing App '/Applications/Docker.app'
==> Purging files for version 4.19.0,106363 of Cask docker
Error: It seems there is already a Binary at '/usr/local/share/zsh/site-functions/_docker'.

real	0m59.864s
user	0m3.605s
sys	0m6.986s
~$ brew doctor
Your system is ready to brew.
~$ 

What did you expect to happen?

There shouldn't be an issue having both docker and the Docker app.

Step-by-step reproduction instructions (by running brew commands)

brew install docker
brew install --cask docker
@osalbahr osalbahr added the bug Reproducible Homebrew/homebrew-core bug label Apr 28, 2023
@osalbahr
Copy link
Contributor Author

osalbahr commented Apr 28, 2023

I will move this to https://github.com/Homebrew/homebrew-cask/issues

Edit: moved to Homebrew/homebrew-cask#146078

@github-actions github-actions bot added the outdated PR was locked due to age label May 29, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

1 participant