How to check if command line tools is installed

后端 未结 10 2155
执念已碎
执念已碎 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:30

    On macOS Sierra (10.12) :

    1. Run the following command to see if CLT is installed:

      xcode-select -p
      

      this will return the path to the tool if CLT is already installed. Something like this -

      /Applications/Xcode.app/Contents/Developer
      
    2. Run the following command to see the version of CLT:

      pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
      

      this will return version info, output will be something like this -

      package-id: com.apple.pkg.CLTools_Executables
      version: 8.2.0.0.1.1480973914
      volume: /
      location: /
      install-time: 1486372375
      

提交回复
热议问题