How to check if command line tools is installed

后端 未结 10 2114
执念已碎
执念已碎 2020-11-30 18:02

I have a macbook pro with OS X 10.8.2. XCode is installed. I know this as it appears in the Applications directory. There are also the xcodebuild and xcode-select files in /

10条回答
  •  自闭症患者
    2020-11-30 18:38

    I think the simplest way which worked for me to find Command line tools is installed or not and its version irrespective of what macOS version is

    $brew config
    

    macOS: 10.14.2-x86_64
    CLT: 10.1.0.0.1.1539992718
    Xcode: 10.1

    This when you have Command Line tools properly installed and paths set properly.

    Earlier i got output as below
    macOS: 10.14.2-x86_64
    CLT: N/A
    Xcode: 10.1

    CLT was shown as N/A in spite of having gcc and make working fine and below outputs

    $xcode-select -p              
    /Applications/Xcode.app/Contents/Developer
    $pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
    No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
    $brew doctor
    Your system is ready to brew.
    

    Finally doing xcode-select --install resolved my issue of brew unable to find CLT for installing packages as below.

    Installing sphinx-doc dependency: python
    Warning: Building python from source:
      The bottle needs the Apple Command Line Tools to be installed.
      You can install them, if desired, with:
        xcode-select --install
    

提交回复
热议问题