1

I accidentally deleted /usr/bin/env and it causing issues when I want to run

brew install python

I am getting the following error:

brew install python3
/usr/local/bin/brew: line 91: /usr/bin/env: No such file or directory
/usr/local/bin/brew: line 91: exec: /usr/bin/env: cannot execute: No such file or directory

I know this was a mistake, can anyone help me get this file back?

bmike
  • 235,889
sko1122
  • 11

2 Answers2

1

There are quite a few ways to get that file back. It's pretty standard, so you could copy it from a backup or another Mac. You can also just reinstall the OS from recovery and a new system is written and your account and apps all remain intact.

Here is the canonical answer with lots of options:

bmike
  • 235,889
-1

Running brew install coreutils should install the GNU version of env.

mttpgn
  • 267