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,怎么装,自己搜索下吧

相关推荐
加载力科技14 小时前
Mac 打开 ISO 文件完整教程:3 种方法挂载与解压,挂载失败也能提取文件
macos·命令模式·磁盘工具·mac打开iso·hdiutil·iso解压·mac技巧
Web Security Loop14 小时前
MAC安装最新Burpsuite pro详细步骤教程
web安全·macos·网络安全·安全性测试
Raspberry_Pi_官方账号15 小时前
Raspberry Pi Desktop 全面升级,现已登陆 PC 和 Mac
服务器·网络·macos·树莓派·raspberry pi·raspberrypios
king135987455015 小时前
EmbeddingGemma 2 270M 实测:Mac CPU、PDF/Word、256d 与 FTS5
macos·pdf·word
Patrick在香港1 天前
同一份脚本,mac 正常 Windows 乱码:open() 默认编码实测(附 3.15 终局)
utf-8·windows·python·macos·跨平台·编码·标准库
DevLoom_1 天前
Mac装NTFS for Mac,不用修改 SIP 安全设置也能正常读写NTFS硬盘
macos·macos 27·mac读写ntfs·ntfs for mac·mac应用
Laurie三省1 天前
现场版却配上录音室版的歌词?聊聊我给开源 Mac 歌词软件写的多源打分算法
算法·macos·go
David@1 天前
Mac中cursor怎么检查更新
macos
Lancker2 天前
没有 Mac 也能上架 iOS:GitHub Actions 全自动构建 + 签名 + TestFlight 送审实录
macos·ios·github
fei_sun3 天前
RIB、FIB、MAC 、ARP 表
服务器·网络·macos