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

Colima requires lima to be installed with native arch #702

Open
1 of 5 tasks
Akari0731 opened this issue Apr 24, 2023 · 16 comments
Open
1 of 5 tasks

Colima requires lima to be installed with native arch #702

Akari0731 opened this issue Apr 24, 2023 · 16 comments

Comments

@Akari0731
Copy link

Description

Hi! After updating brew and reinstalling colima on mac, I get this error when I run colima start.
limactl is running under rosetta, please reinstall lima with native arch

Could you guide me how to fix this issue?
MacOS: Ventura 13.3.1
Chip: Apple M2
Homebrew: 4.0.15

Version

Colima Version: 0.5.4
Lima Version: 0.15.1
Qemu Version: 8.0.0

Operating System

  • macOS Intel <= 12 (Monterrey)
  • macOS Intel >= 13 (Ventura)
  • macOS M1 <= 12 (Monterrey)
  • macOS M1 >= 13 (Ventura)
  • Linux

Output of colima status

FATA[0000] limactl is running under rosetta, please reinstall lima with native arch 
WARN[0000] error detecting Lima config directory: error retrieving lima info: exit status 1 
WARN[0000] falling back to default '$HOME/.lima'        
FATA[0000] colima is not running  

Reproduction Steps

  1. brew install colima
  2. colima start

Expected behaviour

colima start runs without any error.

Additional context

No response

@abiosoft
Copy link
Owner

You most likely need to reset and reinstall homebrew.

@therealtimhawkins
Copy link

Hi, I'm also having this issue on an M1 - Monterrey. I've tried reseting and reinstalling homebrew. Have you got any other ideas how to fix it?

@abiosoft
Copy link
Owner

abiosoft commented May 5, 2023

Do you have colima and lima installed in /usr/local/bin or /opt/homebrew/bin?

@therealtimhawkins
Copy link

therealtimhawkins commented May 5, 2023

They are in /usr/local/bin

@abiosoft
Copy link
Owner

abiosoft commented May 5, 2023

They are in /usr/local/bin

If you are using an M1 device, they should be in /opt/homebrew/bin. Maybe ensure your terminal is also native m1 app and not running in rosetta x86 emulation mode.

@lironrisk
Copy link

reinstalling homebrew didn't solve the issue for me

@gknitzberg
Copy link

New M2; same problem; There is no $HOME/.lima folder.

FATA[0000] limactl is running under rosetta, please reinstall lima with native arch
WARN[0000] error detecting Lima config directory: error retrieving lima info: exit status 1
WARN[0000] falling back to default '$HOME/.lima'
INFO[0000] starting colima
INFO[0000] runtime: docker
INFO[0000] preparing network ... context=vm
INFO[0001] creating and starting ... context=vm

limactl is running under rosetta, please reinstall lima with native arch
FATA[0001] error starting vm: error at 'creating and starting': exit status 1

@rfay
Copy link
Contributor

rfay commented May 11, 2023

If you're on an Apple Silicon machine (M1/M2), you should only have tools installed by homebrew in /opt/homebrew/bin. Nowhere else. If you have colima or limactl or qemu* or the docker client installed in /usr/local/bin, that's the problem. You must uninstall homebrew and reinstall it. You have all tools of the wrong architecture.

@uraniumdawn
Copy link

uraniumdawn commented May 12, 2023

I had no idea at all why this error happened.

➜  bin git:(stable) where brew
/opt/homebrew/bin/brew
➜  bin git:(stable) where lima
/opt/homebrew/bin/lima
➜  bin git:(stable) where colima
/opt/homebrew/bin/colima
➜  bin git:(stable) colima start
FATA[0000] limactl is running under rosetta, please reinstall lima with native arch
WARN[0000] error detecting Lima config directory: error retrieving lima info: exit status 1
WARN[0000] falling back to default '$HOME/.lima'
INFO[0000] starting colima
INFO[0000] runtime: docker
INFO[0000] preparing network ...                         context=vm
INFO[0000] creating and starting ...                     context=vm
> limactl is running under rosetta, please reinstall lima with native arch
FATA[0000] error starting vm: error at 'creating and starting': exit status 1

But then noticed that limactl exists in the /usr/local/bin/limactl and /opt/homebrew/bin/limactl. It looks like the first one was using for start VM. Removing /usr/local/bin/limactl resolved the problem.

@rfay
Copy link
Contributor

rfay commented May 12, 2023

Yay!

@bizzoni
Copy link

bizzoni commented May 16, 2023

I was facing the same issue with MAC M1 and ZSH installed.
What I did to make it work:

  1. sudo nano /etc/paths -> add /opt/homebrew/bin on the top of the list
  2. restart your terminal
  3. arch -arm64 brew install lima -> This way I now have lima installed at: /opt/homebrew/bin/lima
  4. colima start

This worked for me

@hoazgazh
Copy link

I have solved this issue on my M1 Air Mac:

  1. Check the location of Homebrew path by running the command "which brew".
    If it shows up as "/usr/local/bin/brew", it is completely wrong. This might be because you previously used macOS on an Intel chip-based Mac Pro and then synced the OS to the M1 Mac. xD

  2. Uninstall Homebrew and then reinstall it. After reinstalling, the correct path for Homebrew should be "/opt/homebrew/bin/brew". This is the correct path.

Now, you can proceed with reinstalling the command-line interfaces (CLI) that were previously installed using the old brew path (which you deleted while uninstalling Homebrew, i mean you just have rm all bin in old brew :))).

@tsikora666
Copy link

Can I reinstall homebrew without losing already installed packages?

@DaleTrexel
Copy link

I'd just like to thank everyone for this thread, and especially @abiosoft for the comment about using the appropriate terminal.

I'm upgrading from an Intel to M3 MBP and made the mistake of thinking I could just copy the .zip iTerm2 install file over from my old system and upgrade it to the latest version. That ended up putting Homebrew in /usr/local/bin instead of /opt/homebrew and ultimately generated the same error with Colima. After uninstalling Homebrew and iTerm2, then installing both properly, the error is gone and everything seems to be working.

Without this thread I would have struggled a lot longer before even considering my terminal installation as the culprit.

@roshan-abady
Copy link

I faced the same issue on my Mac M1 and thanks to all the above managed to resolve it.
What I did was simple, no need to uninstall brew:

  1. Ran where brew, it showed up in both /usr/local/bin and /opt/homebrew/bin
  2. Opened /usr/local/bin, it contained numerous shortcuts to most of my apps
  3. Removed all shortcuts
  4. brew reinstall any that complained

Worked like a charm!

Couldn't have done it or thought of it without this thread, Thank You All!

@danman01
Copy link

danman01 commented May 4, 2024

You may want to read this before uninstalling intel homebrew to save your old packages: port all old intel packages to new M1 homebrew by using a Brewfile: https://apple.stackexchange.com/questions/410825/apple-silicon-port-all-homebrew-packages-under-usr-local-opt-to-opt-homebrew (see accepted answer there)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests