damiano
damiano

Reputation: 21

Zend Framework on Mac: -bash: ./zf.sh: /bin/sh: bad interpreter: Operation not permitted

I am trying to set up Zend Framework on my Mac (Max OS X 10.7.3). While I had done it in the past, I am running into a problem with the Zend Tool that I had never experienced before. In particular, when I try to run the Zend Tool (zf.sh), I always get this error:

-bash: ./zf.sh: /bin/sh: bad interpreter: Operation not permitted

The problem doesn't appear to be with the Shell itself, since the binary is right where it should be. I tried to modify the script to use Bash, but the result is the same. I am getting this error by running ./zf.sh from the same directory where the script is located (which is my Downloads folder, at the moment). If I use sh zf.sh or bash zf.sh, however, everything works fine. I have tried all possible approaches that I found to be vaguely related to this issue, to include:

None of that made a difference and I am not sure of what could be causing this problem.

Upvotes: 0

Views: 1064

Answers (1)

damiano
damiano

Reputation: 21

The problem seems to have been caused by characters (end-of-line, most likely) not supported by my platform. Interestingly, opening the file in BBEdit, sanitizing the text and then saving it with the correct line-ending characters didn't work. However, copying and pasting the file's content into a new file in BBEdit and then saving it did the trick.

Upvotes: 1

Related Questions