(Apple M1) No such file or directory - /usr/local/bin/brew
jshah opened this issue · 2 comments
jshah commented
Indicate troubleshooting steps taken
- Ran
brew update
and retried your prior step? - Ran
brew doctor
, fixed as many issues as possible and retried your prior step? - Checked that a similar issue hasn't already been filed?
- Looked up the software bug tracker if reporting a build error?
- If you're seeing permission errors tried running
sudo chown -R $(whoami) $(brew --prefix)
?
Bug reports / build errors:
❯ brew install -v nginx-full --with-lua-module --with-set-misc-module --with-geoip2-module
==> Downloading https://nginx.org/download/nginx-1.19.10.tar.gz
Already downloaded: /Users/jshah/Library/Caches/Homebrew/downloads/89ecedcb2cec8851d21199e84277209b4e2d038929ca3b0e9aa38810e7e96bb5--nginx-1.19.10.tar.gz
==> Verifying checksum for '89ecedcb2cec8851d21199e84277209b4e2d038929ca3b0e9aa38810e7e96bb5--nginx-1.19.10.tar.gz'
==> Installing nginx-full from denji/nginx
tar --extract --no-same-owner --file /Users/jshah/Library/Caches/Homebrew/downloads/89ecedcb2cec8851d21199e84277209b4e2d038929ca3b0e9aa38810e7e96bb5--nginx-1.19.10.tar.gz --directory /private/tmp/d20220421-98045-sunbn8
cp -pR /private/tmp/d20220421-98045-sunbn8/nginx-1.19.10/. /private/tmp/nginx-full-20220421-98045-pmnef6/nginx-1.19.10
chmod -Rf +w /private/tmp/d20220421-98045-sunbn8
Error: An exception occurred within a child process:
Errno::ENOENT: No such file or directory - /usr/local/bin/brew
Brief summary of issue:
Homebrew is installed in /opt/homebrew/bin/brew
on the Apple M1. Is there a way to detect arch type and look for brew in the correct directory?
The complete command that you issued:
brew install -v nginx-full --with-lua-module --with-set-misc-module --with-geoip2-module
Gist with output of brew doctor
:
❯ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
/Users/jshah/.pyenv/shims/python2-config
/Users/jshah/.pyenv/shims/python2.7-config
/Users/jshah/.pyenv/shims/python-config
Link output by brew gist-logs <formula>
:
Output of brew config
:
❯ brew config
HOMEBREW_VERSION: 3.4.7
ORIGIN: https://github.com/Homebrew/brew
HEAD: 09e766f83c8a420cce9e2210c46a24ec3864a094
Last commit: 3 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 45a1bf508f26a0ecfa0056112e8e347b4fbd5b34
Core tap last commit: 3 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 13.1.6 build 1316
Git: 2.32.0 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.3.1-arm64
CLT: 13.3.1.0.1.1648687083
Xcode: 13.3.1
Rosetta 2: false
Formula Requests:
The quickest way to get a new formula into Homebrew is to file a Pull Request.
We will consider your request but it may be closed if it's something we're not actively planning to work on.
jshah commented
I also tried installing brew on Rosetta 2 using https://stackoverflow.com/questions/64963370/error-cannot-install-in-homebrew-on-arm-processor-in-intel-default-prefix-usr as a guide but still no luck.
ajakov commented
I have the same problem on Apple M1