/bin/sh^M: bad interpreter: No such file or directory

前端 未结 2 1579
南笙
南笙 2020-12-08 16:15

When I enter brew doctor (or any brew command) in my terminal, I get this as a response:

-bash: /usr/local/bin/brew: /bin/sh

2条回答
  •  一整个雨季
    2020-12-08 17:10

    This worked for me:

    1. Open file /usr/local/bin/brew with vi (vi /usr/local/bin/brew)
    2. While on vi issue this commad (via esc or :) :set fileformat=unix
    3. Close file on vi via :wq!

    The brew command should be OK now.

    Regards.

提交回复
热议问题