Mac执行brew install libimobiledevice提示Operation not permitted如何处理
问题解决方法
这个报错是Homebrew对/usr/local/Cellar下的依赖目录没有写入修改权限导致,按以下步骤操作即可解决:
- 首先修复Homebrew所属目录的权限,终端执行以下命令:
输入你的管理员密码确认即可,该命令会自动适配Intel芯片和M系列芯片的Mac的Homebrew安装路径,无需手动修改路径。sudo chown -R $(whoami) $(brew --prefix)/* - 单独修复异常的openssl@1.1依赖,执行:
brew uninstall --ignore-dependencies openssl@1.1 brew install openssl@1.1 - 重新执行目标安装命令:
brew install libimobiledevice - 若上述操作后仍然报错,可检查对应目录是否被设置了锁定属性:
执行ls -ldO /usr/local/Cellar/openssl@1.1查看输出中是否有uchg标记,如果存在则执行以下命令解除锁定后再重新安装:sudo chflags -R nouchg /usr/local/Cellar/openssl@1.1
内容的提问来源于stack exchange,提问作者Mario Ramos García
相关产品推荐
相关产品推荐

