My Emacs App used to work fine until today, it starts to complain that zsh:1: command not found: git

git is installed on my computer at /usr/bin/git

Other info:

  • MacOS: Monterey
  • Emacs: 27.2

a screen shot of the problem

1 Answer 1


It also complains about not finding tr. I suspect that you've changed your PATH environment variable to something invalid such that it doesn't contain /usr/bin anymore.

  • Yes, I added the following to init.el: (setenv "PATH" (concat ":/usr/bin/" (getenv "PATH"))) (add-to-list 'exec-path "/usr/bin/") Jun 23, 2022 at 9:25
  • @xiaohan2012 That is wrong you need the : after /usr/bin ie "/usr/bin:" Look at what exec-path is. ALso I can't see why you are adding /usr/bin to the PATH in the first place as that will already be on the path.
    – mmmmmm
    Jun 23, 2022 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.