You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Mid-2015款McBkPro(High Sierra 10.13.3)xcrun缺失问题求助

Fix for "xcrun: error: invalid active developer path" on High Sierra 10.13.3

Hey, I’ve dealt with this exact error a few times on older Macs running High Sierra—total buzzkill when you’re gearing up for a new project and all your terminal commands die on you. Let’s get this sorted quickly.

The Root Cause

You’re right on the money: the Xcode Command Line Tools are either missing, or your system’s path to them got messed up. These tools are required for almost all development commands (git, npm, homebrew stuff, etc.), so without them, nothing works.

Step-by-Step Fixes

  • Install (or Reinstall) Command Line Tools via Terminal
    This is the easiest way. Open up Terminal and run this command:

    xcode-select --install
    

    A pop-up window will appear asking you to install the tools. Click "Install", agree to the license, and let it finish downloading and installing. Once done, quit and restart Terminal, then try running your project commands again—they should work now.

  • Reset the Command Line Tools Path (If Installation Doesn’t Help)
    Sometimes the system’s path to the tools gets corrupted even if they’re installed. Fix that with:

    sudo xcode-select --reset
    

    You’ll need to enter your Mac’s admin password (it won’t show up as you type, that’s normal). After running this, check if the path is set correctly with:

    xcode-select -p
    

    It should output /Library/Developer/CommandLineTools. If it shows a path to a full Xcode app (like /Applications/Xcode.app/Contents/Developer) and you don’t have Xcode installed, just re-run the first install command to get the standalone tools.

  • Accept the Xcode License (If Needed)
    If you have Xcode installed but never agreed to its license, that can also cause this error. Run this command to accept it:

    sudo xcodebuild -license accept
    

    Enter your admin password when prompted, and you’re good to go.

Final Check

After any of these steps, test a simple command like git --version or gcc --version to make sure the tools are working. If they output a version number, you’re all set to start your new project!

内容的提问来源于stack exchange,提问作者Frenchmassacre

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 08:56:05