mac编译ijkplayer遇到问题

问题:./init-android.sh git version 2.44.0 == pull ffmpeg base == : command not founde.sh: line 2: : command not founde.sh: line 5: : command not founde.sh: line 6: tools/pull-repo-base.sh: line 9: syntax error near unexpected token elif' 'ools/pull-repo-base.sh: line 9: elif [ ! -d $LOCAL_WORKSPACE ]; then

问题原因:

脚本中的换行符问题

  • Windows 风格的换行符(\r\n)导致脚本在 Unix 环境中解析错误。
  • 修复此问题需要将脚本转换为 Unix 风格。

解决办法:

# 转换主脚本和其调用的脚本
find . -type f -name "*.sh" -exec dos2unix {} \;
当然,你要自己安装下dos2unix,怎么装,自己搜索下吧

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值