Cannot run refind-install from Recovery because "/usr/bin/env: bad interpreter" I have managed to change the present working directory to the folder containing downloaded rEFInd files. I have booted to Recovery Mode. The refind-bin-0.11.3 folder was downloaded to my Downloads folder.

I came across a new problem: ‘bad interpreter: no such file or directory’.



How can I fix this problem?
I suspect the ‘refind-install’ script has a shebang pointing to /usr/bin/env, such as



#!/usr/bin/env bash


The Recovery environment doesn't have a /usr/bin/env, so attempting to access that path returns the error that there's ‘no such file or directory’ there.

You can manually choose a shell to execute a script with by passing the script to the shell:

bash ./refind-install


Alternatively, you should be able to edit the script to point directly at the shell. Replace the first line in the script with something like this, presuming the line above is what's in the file.

#!/bin/bash

Note the space has been removed.

I have `/usr/bin/env` in my &quot;Macintosh HD&quot; but not in the recovery partition. Is this normal?