No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. 解决方案

  1. 执行如下命令
    /usr/sbin/pkgutil --packages | grep CLTools
    如果没有返回值,说明缺少xcode相关工具包
  2. 依此执行如下命令
xcode-select --print-path
# in my case /Library/Developer/CommandLineTools

# the next line deletes the path returned by the command above
sudo rm -rf $(xcode-select --print-path)

# install them (again) if you don't get a default installation prompt
xcode-select --install
  1. 重新执行步骤一的命令,得出如下结果即可解决
com.apple.pkg.CLTools_Executables
com.apple.pkg.CLTools_SDK_macOS110
com.apple.pkg.CLTools_SDK_macOS1015
com.apple.pkg.CLTools_macOS_SDK

你可能感兴趣的:(No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. 解决方案)