美文网首页
mac执行脚本遇到的问题

mac执行脚本遇到的问题

作者: 未央生 | 来源:发表于2017-03-01 10:28 被阅读82次

今天在编译pjsip2.6遇到错误:-bash: ./configure-iphone: /bin/bash^M: bad interpreter: No such file or directory

报错原因:xxxx.sh脚本是dos格式
验证方式:

  • 1.终端使用:vi xxxx.sh
  • 2.再使用命令:set ff?,如果是dos格式则会输出:
    fileformat=dos
  • 3.强制转换成unix格式,使用命令 :set ff=unix

相关文章

网友评论

      本文标题:mac执行脚本遇到的问题

      本文链接:https://www.haomeiwen.com/subject/uzrqgttx.html