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

相关推荐
aosky15 小时前
手机远程畅玩OpenAI Codex
macos·智能手机·cocoa
A懿轩A18 小时前
【2026 最新】Python 下载与安装:在 macOS 下使用 Homebrew 和 pyenv 完美管理多版本 Python
python·macos·mac
IKaros_α‌18 小时前
mac上安装openclaw从入门到删除
macos
x-cmd18 小时前
macOS 内存模型深度解析 | x free 设计哲学
linux·macos·内存·策略模式·free·x-cmd
itinymeng19 小时前
在 macOS 上遇到 brew: command not found 错误,通常是因为 ‌Homebrew 未安装‌ 或 ‌PATH 环境变量未正确配置‌
macos
oscar99919 小时前
Claude Code 的“计算机使用”功能:让命令行助手真正操控macOS桌面
macos·claude code·computer
老兵发新帖2 天前
软件开发国内常用镜像源配置及回退方法(MAC版)
macos·软件工程
qq_411262422 天前
ESP32-C5 软件配置MAC 地址
macos
鸠摩智首席音效师2 天前
如何在 MacOS 上安装 PostgreSQL ?
数据库·macos·postgresql
花千树-0102 天前
IndexTTS2 在 macOS 性能最佳设置(M1/M2/M3/M4 全适用)
人工智能·深度学习·macos·ai·语音识别·ai编程