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

Install script does not correctly detect Arm64 chip #767

Closed
2 tasks done
mcsantiago opened this issue May 8, 2023 · 9 comments
Closed
2 tasks done

Install script does not correctly detect Arm64 chip #767

mcsantiago opened this issue May 8, 2023 · 9 comments
Labels

Comments

@mcsantiago
Copy link

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • your problem was from running the official install or uninstall script?
  • after installation: ran brew config and brew doctor and included their output with your issue? If you couldn't install: provided your OS version with the output of your issue?

What you were trying to do (and why)

Run the install script via the following command

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Here are the system specs:

System Specs
OS: macOS Monterey 12.0.1
MacBook Pro (14-inch, 2021)
Chip: Apple M1 Pro

What happened (include command output)

It turns out that UNAME_MACHINE="$(/usr/bin/uname -m)" will still resolve to x86_64 (and NOT arm64). The result is something like this:

Command output

()[~, 1s, SUDO]: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Checking for sudo access (which may request your 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
/usr/local/Frameworks

What you expected to happen

I would expect that the installation will take place in /opt/homebrew for the arm64 architecture.

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

  1. Run the following /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)".
  2. Observe output discrepancy mentioned above.
@SMillerDev
Copy link
Member

From where are you running this script?

@mcsantiago
Copy link
Author

I'm not sure I understand the question. I'm running the command on my local macbook machine using iTerm.

@Bo98
Copy link
Member

Bo98 commented May 8, 2023

This means you are running your terminal in Rosetta mode. This will install the Rosetta version of Homebrew (x86_64).

@mcsantiago
Copy link
Author

This will occur even if using the system bash (/bin/bash)? I'm not sure what this Rosetta mode is. What is the guidance for getting the correct uname in this case?

@carlocab
Copy link
Member

carlocab commented May 8, 2023

Try

arch -arm64 /bin/bash ...

Though you should fix your terminal too. That'll cause you other surprises down the line.

@mcsantiago
Copy link
Author

Thanks for the tip. I switched the terminal to the default system terminal (not iTerm) and I got the expected /opt/homebrew path. This was most unexpected and I have something else to look into with Rosetta mode. Thanks for the help! I'll close this issue now.

@Bo98
Copy link
Member

Bo98 commented May 8, 2023

General tips I can give is: make sure the "Open in Rosetta" checkbox is not ticked (control-click iTerm -> Get Info), and make sure you're not using an old version of iTerm.

@mcsantiago
Copy link
Author

I double checked this. "Open in Rosetta" is not checked for iTerm2. It's still puzzling to me as to why the application opens in x86_64 land in the first place.

@SMillerDev
Copy link
Member

Because it's not an ARM app.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants