I'm trying to follow Install Minikube and even though there are no errors during install, I still unable to run it:
$ brew install minikube
Updating Homebrew...
==> Downloading https://homebrew.bintray.com/bottles/minikube-1.5.2.catalina.bottle.tar.gz
Already downloaded: /Users/alexus/Library/Caches/Homebrew/downloads/a466d3b5c7208788bb6a82fa4de4576440dbfa3b7b5b1d4ddb48cb9a3d44f1e9--minikube-1.5.2.catalina.bottle.tar.gz
==> Pouring minikube-1.5.2.catalina.bottle.tar.gz
==> minikube cask is installed, skipping link.
==> 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
$ minikube
-bash: minikube: command not found
$
Please advise.
$ sudo mv minikube /usr/local/bin
Password:
mv: rename minikube to /usr/local/bin/minikube: No such file or directory
$
minikube version:
$ /usr/local/Cellar/minikube/1.5.2/bin/minikube version
minikube version: v1.5.2
commit: 792dbf92a1de583fcee76f8791cff12e0c9440ad
$
Try using
brew link minikube
which solved the issue for me. After installing minikube using Homebrew (brew install minikube) we need to run the above command which will create symlinks for us. Then the minikube command works fine.
This looks like an issue with your path:
Restart the terminal.
Did you add minikube to the path per the documentation?
Hereโs an easy way to add the Minikube executable to your path: sudo
mv minikube /usr/local/bin
Verify the path with which minikube.
Edited to address new info in questions:
This is still a path issue. It appears that your install went to /usr/local/Cellar/minikube/1.5.2 not /usr/local/bin/minikube. The different aliases are looking for the latter directory which is why this is not working for you. You should move the directory as per the documentation so that the scripts with the various shortcuts can find the proper link.
my way of solving this:
$ cd /usr/local/Cellar/minikube/
$ sudo ln -s 1.5.2 current
Password:
$ cd /usr/local/bin/
$ ln -s /usr/local/Cellar/minikube/current/bin/minikube
$
$ minikube version
minikube version: v1.5.2
commit: 792dbf92a1de583fcee76f8791cff12e0c9440ad
$
This helped me on ubuntu:
sudo ln /home/linuxbrew/.linuxbrew/Cellar/minikube/1.28.0/bin/minikube /usr/local/bin
To discover if your path to minikube differs, use:
$ brew link minikube
Related
I am having problems with cocoa pods (Mac Mojave 10.14) . I believe I have successfully installed it, but my pod commands are not recognised. Here is my terminal session:
Jims-MacBook-Pro:IOSChartTest KatherineBurke$ sudo gem install cocoapods
Password:
Successfully installed cocoapods-1.9.1
Parsing documentation for cocoapods-1.9.1
Done installing documentation for cocoapods after 2 seconds
1 gem installed
Jims-MacBook-Pro:IOSChartTest KatherineBurke$ pod --version
-bash: pod: command not found
Jims-MacBook-Pro:IOSChartTest KatherineBurke$
Solution
sudo gem install -n /usr/local/bin cocoapods
Why?
I'm not super familiar with the unix file structure and permissions but my understanding is:
On any given command do which git, which pod, which gem, etc when you do that the command line will tell you from where it's running git or pod or gem command.
My results:
~ $ which pod
/usr/local/bin/pod
~ $ which git
/usr/local/bin/git
~ $ which gem
/usr/bin/gem
Since macOS Catalina, Apple has changed the permissions and now most of the system files are write-protected. See here.
As a result you should have it installed into /usr/local/bin/ where local programs and scripts belong to. For more on the directories see here
I have installed the kudo plugin on my Linux machine following the instructions in the Kudo CLI page using brew. But it throws error on execution,
user#factotum:~$ kubectl kudo
Error: unknown command "kudo" for "kubectl"
Run 'kubectl --help' for usage.
I tried to list the available plugins, but doesn't have any,
user#factotum:~$ kubectl plugin list
error: unable to find any kubectl plugins
Just installed to reproduce and seems works fine. Have you init it with kubectl kudo init as it mentioned in Install KUDO into your cluster?
My steps(Ubuntu 16.04, 4.15.0-1033-gcp):
$sudo apt install linuxbrew-wrapper
$brew update
$brew vendor-install ruby
$brew update
==> Migrating from Linuxbrew/brew to Homebrew/brew
Linuxbrew/brew has been merged into Homebrew/brew!
Linuxbrew/brew will no longer be updated.
Your git remote has been changed from
https://github.com/Linuxbrew/brew.git
to https://github.com/Homebrew/brew
See the blog post at https://brew.sh/2019/02/02/homebrew-2.0.0/
Already up-to-date.
$brew tap kudobuilder/tap
brew install kudo-cli
==> Downloading https://linuxbrew.bintray.com/bottles-portable-ruby/portable-ruby-2.6.3.x86_64_linux.bottle.tar.gz
######################################################################## 100.0%
....
....
....
....
๐บ /home/bla/.linuxbrew/Cellar/kudo-cli/0.10.1: 5 files, 38.2MB, built in 6 seconds
==> `brew cleanup` has not been run in 30 days, running now...
==> Caveats
==> kubernetes-cli
Bash completion has been installed to:
/home/bla/.linuxbrew/etc/bash_completion.d
$ kubectl kudo init
$KUDO_HOME has been configured at /home/bla/.kudo
โ
installed crds
โ
installed service accounts and other requirements for controller to run
โ
installed kudo controller
Test:
$ kubectl kudo get instances
List of current installed instances in namespace "default":
.
$ kubectl kudo install redis
operator.kudo.dev/v1beta1/redis created
operatorversion.kudo.dev/v1beta1/redis-0.2.0 created
instance.kudo.dev/v1beta1/redis-instance created
$ kubectl plugin list
The following compatible plugins are available:
/home/bla/.linuxbrew/bin/kubectl-kudo
Hope it helps
Can you execute kubectl-kudo? A kubectl plugin is basically just a binary that starts with kubectl-.
So, check where brew installed the kudo binary and check your $PATH.
And you can use kubectl-kudo instead of kubectl kudo if the plugin mechanism doesn't work for some reason.
Did you remember to add the brew environment variables to your shell?
As pr https://brew.sh/ and their install-script https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh you need to add brew to your PATH among others.
OP is tagging bash here so adding this to your shell configuration file.
There will be slight variations based on what shell the user is running, bash, ksh, csh, tcsh.
# At the bottom of .bashrc or .bash_profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
I had installed minikube a few months ago and wanted to upgrade as newer versions are available.
I am unable to find out how to upgrade minikube. I see a feature request for an upgrade command here - https://github.com/kubernetes/minikube/issues/1171
I tried to then uninstall minikube and hit another brickwall again. I don't see a command to uninstall minikube. The information that came closest to this was not very helpful - https://github.com/kubernetes/minikube/issues/1043
I guess we need ways to upgrade these (at least once every 6 months or so).
Before reinstall minikube (OS X), check the following:
Make sure that you have brew updated:
brew update
Make sure that you already have cask installed:
brew cask install minikube --verbose
Finally, execute the following command in the same directory you've installed minikube previously (usually /usr/local/bin/):
brew cask reinstall minikube
If you see an output similar to this:
Error: It seems there is already a Binary at '/usr/local/bin/minikube'; not linking.
Remove the existing binary:
rm /usr/local/bin/minikube
Now, you should able to reinstall (upgrade) minikube. :)
brew upgrade minikube
Just upgrade minikube with brew
This should do the trick.
brew cask reinstall minikube
First, unlink the existing minikube from /usr/local/bin then reinstall:
$ sudo rm -rf /usr/local/bin/minikube # unlink existing minikube
$ brew update # update brew itself
$ brew cask reinstall minikube # reinstall latest minikube
An updated way is to use this:
brew cask upgrade minikube
Process to update:
Minikube is an executable: Re-install minikube is an upgrade.
Optionally you can remove ~/.minikube which will make minikube completely re-initialize and also update your kubernetes version (if a new version has been made available for minikube).
minikube delete
sudo rm -rf ~/.minikube
re-install minikube and it should work
if you are using Windows machine and Chocolatey package manager -
Step 1: run PowerShell as administrator
Step 2: run following command choco upgrade minikube
More on chocolatey https://chocolatey.org/
As of early 2020, and based on the guidance provided by this answer, minikube is no more available as a cask. You need to run:
brew install minikube
Minikube is no longer available in cask and calling brew cask while performing install, upgrade, or reinstall is deprecated! Use the below syntax instead:
Make sure brew is updated:
brew update
Then, to install, use:
brew install minikube
To upgrade, use:
brew upgrade minikube
To reinstall, use:
brew reinstall minikube
If you're reading this in 2020+:
brew upgrade minikube
On linux:
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.22.0/minikube-linux-amd64 && chmod +x minikube && sudo cp minikube /usr/local/bin/ && rm minikube
Change the version you want to download. Above script uses 1.22.0
Just try brew upgrade minikube
brew reinstall minikube --cask did the trick for me
In order to upgrade in Windows, type:
minikube start
The following is the output you will get (make sure you are connected to internet):
Here is a newer version of Minikube available (v0.28.0). Download it here:
https://github.com/kubernetes/minikube/releases/tag/v0.28.0
if you don't get the above message then first run
minikube config set WantUpdateNotification true
then do,
minikube start
Before that, remove all the Minikube links from the system:
Remove the previous installation path.
From this folder, remove c:\Users\<user-name>\ .kube folder.
Using Mac OSX 10.10.4 on 13' Macbook Air
Typed in 'brew update' like the Mongo docs said and it updated
Then typed 'brew install mongodb' and it took ages to say
Error: Permission denied - (mongod.conf, /usr/local/etc/mongod.conf)
This is what the console said leading up to that point, in case this helps:
Joshuas-Air:~ Josh$ brew install mongodb
==> Downloading https://homebrew.bintray.com/bottles/mongodb-3.0.4.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring mongodb-3.0.4.yosemite.bottle.tar.gz
Error: Permission denied - /usr/local/etc/mongod.conf
Warning: Bottle installation failed: building from source.
==> Installing mongodb dependency: scons
==> Downloading https://homebrew.bintray.com/bottles/scons-2.3.5.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring scons-2.3.5.yosemite.bottle.tar.gz
๐บ /usr/local/Cellar/scons/2.3.5: 208 files, 2.4M
==> Downloading https://fastdl.mongodb.org/src/mongodb-src-r3.0.4.tar.gz
######################################################################## 100.0%
==> Cloning https://github.com/mongodb/mongo-tools.git
Updating /Library/Caches/Homebrew/mongodb--github.com-mongodb-mongo-tools--git
==> Checking out tag r3.0.4
==> ./build.sh
==> /usr/local/opt/scons/bin/scons install --prefix=/usr/local/Cellar/mongodb/3.0.4 -j4 --osx-version-min=10.10 --cc=/usr/bin/clang --cxx=/usr/bin/clang++ --use-new-tools
Error: Permission denied - (mongod.conf, /usr/local/etc/mongod.conf)
Joshuas-Air:~ Josh$
Any help at all would be appreciated.
I had mostly the same error. I could not solve the problem by chown'ing the /usr/local directories as the prompts suggest possibly due to my upgrade to High Sierra. I was able to succeed installing mongodb by reinstalling homebrew using the following command:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
This allowed my subsequent brew install mongodb to work.
I had the same problem, changing the directory permissions didn't work for me so eventually I've found this solution:
Download the most recent version (.tgz).
Open the terminal and head to the ~/Downloads folder or wherever you saved the file.
Untar: tar xvf filename.tgz.
Enter the directory and go to the bin directory.
At the terminal use the sudo bash (become root) command.
Now enter the command cp * /usr/local/bin.
Create /data/db directories (optional, this is the default location MongoDB uses).
At the terminal use the command exit to exit root user.
which mongo should now respond with /usr/local/bin and you are all set to go.
My guess is that the permissions on the folder /usr/local/ are not set 755 or 777.
You can change the permissions or simply try to run the command as root:
sudo brew install mongodb
Hi I just tried installing git via homebrew on my mac - something is wrong. I had the github for mac app installed, but I tried removing that. The current git version in my system is:
Nielsk#~: $ git --version
git version 1.9.3 (Apple Git-50)
This is what happens if I try to install git via homebrew:
Nielsk#~: $ brew install git
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/git-2.1.3.y
######################################################################## 100,0%
==> Pouring git-2.1.3.yosemite.bottle.tar.gz
==> Caveats
The OS X keychain credential helper has been installed to:
/usr/local/bin/git-credential-osxkeychain
The 'contrib' directory has been installed to:
/usr/local/share/git-core/contrib
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completion has been installed to:
/usr/local/share/zsh/site-functions
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Permission denied - /usr/local/lib/perl5/site_perl/5.18.2
Error: Permission denied - /usr/local/lib/perl5/site_perl/5.18.2
How can I solve this?
I also met the same issue. I think we should change the readable permission to make sure any of the directories is readable by "all". So I tried the command: sudo chown -R $USER:admin /usr/local
and then: brew link --overwrite git It works for me, hope it will also work for you.
From High Sierra, chown of /usr/local is not allowed. However you can still change permission the sub directories in /usr/local.
In my case, I had to create Frameworks in /usr/local and sudo chown -R $(whom) Frameworks. After that follow what brew doctor says.
The better way is to create subdirectory whatever you need and run
sudo chown -R $(whoami) $(brew --prefix)/*
For those with the new El Capitan OS, you'll need to update your permissions:
Open Terminal and type the following commands:
$ sudo chown -R $(whoami):admin /usr/local
$ brew doctor
$ brew update
$ brew link --overwrite git
The above solution will work for other brew installs like node, etc. Just replace the last line if you started the installation but encountered errors during the brew installation.
I had a similar permission denied error on install of git until I cleaned things up:
$brew doctor
..... << long output of issues, so you run:
$brew prune
$brew doctor
..... << less issues now, so manually clean up
$brew update
$brew install git
Does that address your error as well?
I did what brew doctor recommended and it helped:
sudo mkdir -p /usr/local/sbin
sudo chown -R $(whoami) /usr/local/sbin
MacOS 10.14.4