Homebrew installs wrong minikube (amd64) instead of 'arm64' on m1 Mac
Asked Answered
U

4

8

Homebrew (brew install minikube) is installing amd64 'minikube' on Macbook Air with M1. while running any minikube command, it prints following message:

╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                          │
│    You are trying to run the amd64 binary on an M1 system.                                               │
│    Please consider running the darwin/arm64 binary instead.                                              │
│    Download at https://github.com/kubernetes/minikube/releases/download/v1.25.2/minikube-darwin-arm64    │
│                                                                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
minikube version: v1.25.2

I think when I installed Homebrew, it wasn't ported to M1, but later I upgraded it, uninstalled and re-installed it, but still same problem.

Any Idea how can I install correct version with Homebrew?

I know, I can install specific arm64 version with sudo install, but I prefer to manage packages with Homebrew.

Ukrainian answered 28/3, 2022 at 23:12 Comment(0)
U
6

Found the issue and posting solution here for someone who might get the same issue. Rare, but could happen... :-)

The problem was that the Terminal application was running under Rosetta. The Homebrew installation script runs command /usr/bin/uname -m to check system architecture. Running this command in a Terminal which runs in Rosetta, returns amd64 architecture, hence homebrew assumes it to be Intel Mac.

To remove Terminal from running under Rosetta, Go To: Finder -> Applications -> Utilities -> Terminal. Right click on Terminal and select Get Info. Uncheck checkbox: 'Open in Rosetta'. Quit Terminal Application.

Restart Terminal Application and test with command /usr/bin/uname -m. It should print arm64

Note: before doing all this, remove Homebrew and all its files/folders.

Ukrainian answered 29/3, 2022 at 17:46 Comment(1)
Thank you! After turning off Rosetta, I had to do the following on mac m1 ventura to restore my packages: install homebrew via their web page instructions, run brew bundle dump and then brew bundle in the same directory.Konstance
P
1

I’m using M1 Macbook so some of the pre-requisite was not able to be installed from Homebrew. Here’s what I followed to start the Minikube instance.

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-arm64
sudo install minikube-darwin-arm64 /usr/local/bin/minikube

That will help anyone with the new Architecture of the M1 .After that try run : minikube start --profile test Hope that helps!

Profanity answered 14/6, 2023 at 13:22 Comment(0)
C
0

So brew installed the ARM version of minikube for me (uname -m was working fine), but it appears I had an older x86 version in /usr/local/bin. Removing that fixed it for me. The swap message is a red-herring.

Cranium answered 29/6, 2023 at 21:1 Comment(0)
T
0

I had the same issue. It turned out that multiple version of Minikube was installed on my machine. So, I had to delete them one by one.

In the terminal, type: which minikube and delete the file output file. Repeat that until no version is found. Then use brew install minikube and test: minikube start --profile test If faced problem, run the recommended command:

brew unlink minikube
brew link minikube

Hope this helps.

Triploid answered 22/12, 2023 at 4:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.