Minikube: improve documentation on brew install link

Created on 3 Nov 2019  路  27Comments  路  Source: kubernetes/minikube

minikube not found after brew isntall

The exact command to reproduce the issue:

brew uninstall minikube
brew install minikube
which minikube
> nothing
command -v minikube
> nothing
cd /usr/local/Cellar/minikube/1.5.2/bin
> ./minikube version
minikube version: v1.5.2
commit: 792dbf92a1de583fcee76f8791cff12e0c9440ad

OS

 > sw_vers
ProductName:    Mac OS X
ProductVersion: 10.13.6
BuildVersion:   17G8037

$PATH

/usr/local/opt/gnu-sed/libexec/gnubin:/Users/butuzov/go/bin:/usr/local/opt/go/libexec/bin:/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/butuzov/bin:/Users/butuzov/.dotfiles/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public/

brew --version

Homebrew 2.1.15-107-g5da322d
Homebrew/homebrew-core (git revision 18e3; last commit 2019-11-03)
Homebrew/homebrew-cask (git revision 7392cc; last commit 2019-11-03)
good first issue help wanted kindocumentation kinsupport packaginbrew

Most helpful comment

You may need link minikube

brew install minikube
brew link minikube

All 27 comments

Shouldn't there be a symlink created in /usr/local/bin/minikube ?

Seems to work OK here, but can't really test it on darwin.

$ brew install minikube
==> Installing dependencies for minikube: patchelf and kubernetes-cli
==> Installing minikube dependency: patchelf
...
==> Installing minikube dependency: kubernetes-cli
...
==> Installing minikube
==> Downloading https://linuxbrew.bintray.com/bottles/minikube-1.5.2.x86_64_linux.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/16/165c2597a97406b80b9e40c643bad35c789fa44ee3fe88063a8e7e56b91089ee?__gda__=exp=1572813642~hmac=6f60975339d342ac60b
######################################################################## 100.0%
==> Pouring minikube-1.5.2.x86_64_linux.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /home/anders/.linuxbrew/etc/bash_completion.d

zsh completions have been installed to:
  /home/anders/.linuxbrew/share/zsh/site-functions
==> Summary
馃嵑  /home/anders/.linuxbrew/Cellar/minikube/1.5.2: 8 files, 43.7MB
$ which minikube 
/home/anders/.linuxbrew/bin/minikube
$ minikube version
minikube version: v1.5.2
commit: 792dbf92a1de583fcee76f8791cff12e0c9440ad

I wish it creates symlink... but no. Need to create a path workaround.

export PATH="/usr/local/Cellar/minikube/1.5.2//bin:${PATH}"

I will check on Mojave tomorrow.

Hmm, that seems to be... less usable. Maybe try brew doctor
Or get some Homebrew support, doesn't seem like minikube ?

Installing a "formula" is supposed to create a symlink as well:
$HOMEBREW_PREFIX/bin/minikube -> ../Cellar/minikube/1.5.2/bin/minikube

Movaje

uninstall

> minikube version
minikube version: v1.4.0
commit: 7969c25a98a018b94ea87d949350f3271e9d64b6
> which minikube
/usr/local/bin/minikube
> command -v minikube
/usr/local/bin/minikube
 > brew cask uninstall minikube
==> Uninstalling Cask minikube
==> Unlinking Binary '/usr/local/bin/minikube'.
==> Purging files for version 1.4.0 of Cask minikube

fresh install

> brew install minikube
==> Installing dependencies for minikube: kubernetes-cli
==> Installing minikube dependency: kubernetes-cli
==> Downloading https://homebrew.bintray.com/bottles/kubernetes-cli-1.16.2.mojav
==> Downloading from https://akamai.bintray.com/12/12b5954c175d44077679d95d96497
######################################################################## 100.0%
==> Pouring kubernetes-cli-1.16.2.mojave.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions have been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
馃嵑  /usr/local/Cellar/kubernetes-cli/1.16.2: 232 files, 52.3MB
==> Installing minikube
==> Downloading https://homebrew.bintray.com/bottles/minikube-1.5.2.mojave.bottl
==> Downloading from https://akamai.bintray.com/4c/4cf3836df30546744ecaf0514c22b
######################################################################## 100.0%
==> Pouring minikube-1.5.2.mojave.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions have been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
馃嵑  /usr/local/Cellar/minikube/1.5.2: 8 files, 51.5MB

 > command -v minikube
/usr/local/bin/minikube
 > brew uninstall minikube
Uninstalling /usr/local/Cellar/minikube/1.5.2... (8 files, 51.5MB)

second install

 > brew install minikube
==> Downloading https://homebrew.bintray.com/bottles/minikube-1.5.2.mojave.bottle.tar.gz
Already downloaded: /Users/butuzov/Library/Caches/Homebrew/downloads/36bda39b263a90de1d96d85e36c312417a33a1eec93c55d845bd51b03cf8da4e--minikube-1.5.2.mojave.bottle.tar.gz
==> Pouring minikube-1.5.2.mojave.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions have been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
馃嵑  /usr/local/Cellar/minikube/1.5.2: 8 files, 51.5MB
 > command -v minikube
/usr/local/bin/minikube

There is no issue on Mojave.

P/S/
I am 100% I was watching full make process on HighSierraThrougth. Not just binary download... It pulled git, pulled submodules, made make "minikube" etc...

P/P/S/
At this point - I guess better to wait for another report from Mac 10.13.6, or close issue after some time if no such exists atm.

I'll leave this open for a little while longer in case someone else comes across this issue.

@sharifelgamal no need for that. I have checked it on my wife's laptop (also HighSierra) - everything has gone smooth. So the issue, somehow, replicates only on my machine.

Feel free to open it it again in case if you also got in the same problem as me.

still a problem on macOS 10.15.1, Homebrew 2.2.0

@Sevyls : Your symlink also missing ? Did you open a bug report with brew ?

https://docs.brew.sh/Troubleshooting

Your symlink also missing ?

yes it was missing, created it manually afterwards

Did you open a bug report with brew ?

no, as I found this issue instead

Did you open a bug report with brew ?

no, as I found this issue instead

Please do, this seems to be brew-specific. There is nothing special in the minikube "formula":

https://github.com/Homebrew/homebrew-core/blob/master/Formula/minikube.rb

You may need link minikube

brew install minikube
brew link minikube
==> Pouring minikube-1.5.2.catalina.bottle.tar.gz
==> minikube cask is installed, skipping link.

@Rub21 thanks, after brew link minikube everything works. but I don't really understand why a cask of a program is not automatically linked, as I don't have minikube elsewhere installed.

my issue is resolved. thanks for the support!

seems like we could add this to our documentaiton !

You can't have a cask and a formula of the same thing installed since they will install the same files. If you uninstall the cask it will automatically link again. (and you only need one install anyway)

EDIT: to fix this run brew cask uninstall minikube and then either brew link minikube or brew reinstall minikube

I have solved this issue

brew unlink minikube && brew link minikube

Close your terminal and again open terminal

@Rub21 thanks, after brew link minikube everything works. but I don't really understand why a cask of a program is not automatically linked, as I don't have minikube elsewhere installed.

Same like @NanheKumar did.

my issue is resolved. thanks for the support!

Rub21 thanks, after brew link minikube everything works. but I don't really understand why a cask of a program is not automatically linked, as I don't have minikube elsewhere installed.

Casks don't have links, formulae do. If it worked after brew link you have the formula installed.

If anybody would be interested in taking on this issue and fixing our docs, we just need to include that if installing with brew, you may need to run brew install minikube for installation to complete successfully.

We can add that in our docs here: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/Start/macos.md

If anyone is interested in taking on this issue, I'd be happy to review any PRs

OK. Let me try @priyawadhwa.

@hendisantika great! I'll assign you to the issue

The real solution is to uninstall the cask brew cask uninstall minikube before you install the formula brew install minikube

@SMillerDev thanks for clarifying! cc @hendisantika let's include in the documentation:

If `which minikube` fails after installing with brew, you may need to uninstall the cask and reinstall by running:

brew cask uninstall minikube
brew install minikube

brew link minikube worked for me

So the issue is minikube used to be a cask but is now a regular ol' formula? Or is brew link minikube required after _every_ brew install minikube?

It really shouldn't be, that would indicate some deeper problem. It's really just for the migration.

Opened #8196 to add brew link minikube to our documentation.

Was this page helpful?
0 / 5 - 0 ratings