MacOS下用Brew安装Meilisearch遇Errno::EPERM权限错误求助
解决MacOS下Brew安装Meilisearch的EPERM权限错误
问题详情
安装过程中触发权限错误,具体报错如下:
==> Installing meilisearch dependency: llvm ==> Downloading https://formulae.brew.sh/api/formula.jws.json ==> Patching ==> Applying 1682c99a8877364f1d847395cef501e813804caa.patch ==> Applying 88dd0d33147a7f46a3c9df4aed28ad4e47ef597c.patch ==> Applying a3e8b860788934d7cc1489f850f00dcfd9d8b595.patch ==> cmake -G Ninja .. -DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;mlir;polly;lldb -DLLVM_ENABLE_RUNTIMES=compiler-rt;libcxx;libcxxabi;libunwind;pstl;openmp -DLLVM_POLLY_LINK_INTO_TOOLS=ON ==> cmake --build . Last 15 lines from /Users/tom/Library/Logs/Homebrew/llvm/02.cmake: tail: /Users/tom/Library/Logs/Homebrew/llvm/02.cmake: No such file or directory Error: An exception occurred within a child process: Errno::EPERM: Operation not permitted @ dir_s_mkdir - /Users/tom/Library/Logs/Homebrew
解决方案
手动创建日志目录并修复权限
执行以下命令,确保Brew能正常写入日志:mkdir -p ~/Library/Logs/Homebrew chown -R $(whoami):staff ~/Library/Logs/Homebrew chmod 755 ~/Library/Logs/Homebrew重置Brew环境
运行Brew自带的诊断和清理命令,修复潜在配置问题:brew doctor brew cleanup重新安装Meilisearch
权限修复后,重新执行安装:brew install meilisearch备选:使用预编译包安装
若LLVM编译仍有问题,强制使用预编译二进制包跳过编译环节:brew install meilisearch --force-bottle
内容的提问来源于stack exchange,提问作者user824624
相关产品推荐
相关产品推荐

