To @sedavidw, /opt/homebrew/bin
contains .keepme
without contents:
/Users/jinrae/.zprofile:1: no such file or directory: opt/homebrew/bin/brew
➜ bin pwd
/opt/homebrew/bin
➜ bin la
total 0
-rw-r--r-- 1 jinrae admin 0B Feb 9 11:04 .keepme
EDIT: I read an article saying that homebrew
is installed in /opt/homebrew/bin
in M1 Mac whereas it is installed in /usr/local
in Intel Mac. I'm trying to reinstall homebrew for M1 Mac now.
EDIT2: I solved the problem. It was due to for what homebrew is installed. As I heard, homebrew is installed in /usr/local
for Intel Mac and /opt/homebrew/bin
for M1 Mac.
I reinstalled homebrew with
/bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/nrubin29/bea5aa83e8dfa91370fe83b62dad6dfa/raw/48f48f7fef21abb308e129a80b3214c2538fc611/homebrew_m1.sh)"
which is slightly different from that in the official site (at least to me).
Anyhow, newly installed homebrew is located in /opt/homebrew/bin
and the problem has been solved.
.zprofile
file. Homebrew is supposed to be installed at/opt/homebrew/bin/brew
. That path you are getting an error for is different (missing the leading/
). So it's probably not able to load that profile correctly. Though your homebrew itself may be working correctly – Ulyanovsk.zprofile
, only a single line was written aseval $(opt/homebrew/bin/brew shellenv)
. I added/
in front ofopt
but it does not resolve the issue. – Trustless