Mac OS: /usr/bin/env: bad interpreter: Operation not permitted

后端 未结 4 791
隐瞒了意图╮
隐瞒了意图╮ 2020-12-04 17:40

I\'m trying to run this script on Mac OS 10.7 (Lion) and I\'m getting the error:

$ bbcolors
-bash: /usr/local/bin/bbcolors: /usr/bin/env: bad interpreter: Op         


        
4条回答
  •  天命终不由人
    2020-12-04 18:17

    pilcrow's answer is correct, however I draw your attention to the fact that if you are working with a disk image, the problem can be very confusing, as the com.apple.quarantine attribute seems to be inherited from the disk image file to the files inside (thanks to febeling at Apple dev forums for noticing that!).

    To solve the problem, you have to remove the quarantine attribute from the disk image:

    xattr -d com.apple.quarantine /path/to/disk/image
    

    and then eject and remount the disk image. Then your files will be clean again.

提交回复
热议问题