Stack Exchange Network
Stack Exchange network consists of 182 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
I have this issue with bash on a MacBook Pro (chip M1, OS: 12.5.1). It’s been there since day1.
I create and modify a new bash_profile file in my ~ folder using vi so I can exclude line-ending issues, formatting issues due to the editor, and such
Most of the commands I write in the .bash_profile file do not work. For example,
echoseems to work;
sourcereturns “No such file or directory” even when the file actually exists and the path is correct;
lsand many others give “Command not found”. All those commands run in the terminal with no problems at all
the $PATH variable seems okay.
exportdoesn’t return an error message. Without appending new paths in
bash_profile, I have
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin, which is what I expect looking into
for example, the line
bash_profiledoesn’t produce any error when sourcing the file; the line
source "/Volumes/Macintosh HD/Applications/root_v6.26.06/bin/thisroot.sh"(file, path verified) gives
No such file or directory
/etc/pathsfile is still untouched:
probably part of the same problem, the terminal overwrites the lines that are longer than the window length
among the attempts to solve the problem, I updated bash to a more recent version, 5.1.0;
bash --versionresponds accordingly. Same errors.
the issue was there with previous OS versions as well. Updating didn’t help
Hopefully, someone who ran into the same issues can share some good hints. Thanks!
You must log in to answer this question.
Browse other questions tagged .