执行shell脚本的一些错误处理
2019-03-20 本文已影响0人
小鬼快跑
1:在安装Tomcat的时候.如果出现类似于"Permission denied"的情况.说明是文件权限不够.
输入 sudo chmod 755 Library/Tomcat/bin/*.sh 回车,设置文件的读写执行权限即可解决.
2:如果遇到类似于"-bash: ./startup.sh: /bin/sh: bad interpreter: Operation not permitted"这种问题,说明是Mac系统下面的一个com.apple.quarantine作祟.删除即可. 删除的方法是$ xattr -rd com.apple.quarantine [directory containing the executables] 例如: 我的文件是Tomcat. 我可以输入如下命令: xattr -rd com.apple.quarantine //Library/Tomcat/ 即可
参考解决方案:A possible solution to 'bad interpreter: operation not permitted' error on Mac OS X Lion