之前帮朋友搭建环境时,在执行sh命令时,遇到了如下问题:`bad interpreter operation not permitted`,于是查阅资料并记录!
解决方案:
找到不能执行的目录,执行如下指令即可:
xattr -rd com.apple.quarantine [dir目录名 | 文件]
参考:
http://blog.techstacks.com/2012/08/bad-interpreter-errors-executing-scripts-in-os-x.html
解决MacOS sh命令错误
本文解决了在MacOS上执行sh命令时遇到的`bad interpreter operation not permitted`错误。通过使用`xattr`命令移除特定目录或文件的`com.apple.quarantine`属性来修复该问题。
870

被折叠的 条评论
为什么被折叠?



