Unable to use xcodebuild on Mavericks with Command Line Tools installed

前端 未结 9 1332
后悔当初
后悔当初 2020-12-07 14:34

I have installed the Command Line Tools:

$ xcode-select --print-path
/Library/Developer/CommandLineTools

However, when anything tries to us

相关标签:
9条回答
  • 2020-12-07 14:51

    Please first go to finder, next select Applications from left panel, next look for Xcode, and check if its name is Xcode or Xcode-Beta

    If name is Xcode-Beta then enter this command in Terminal:

    sudo xcode-select -switch /Applications/Xcode-Beta.app/Contents/Developer
    

    If name is Xcode then enter this command:

    sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
    

    Hope this answer might help for users with Beta version of Xcode

    Thanks

    0 讨论(0)
  • 2020-12-07 14:56

    AFAIK, command line tools in Mavericks are installed into /Applications/Xcode.app/Contents/Developer which tends to imply that Xcode is required. Undocumented feature probably.

    0 讨论(0)
  • 2020-12-07 15:05

    If you use XCode2: sudo xcode-select --switch /Applications/Xcode\ 2.app/Contents/Developer

    Pay attention to the "\" to escape the space.

    0 讨论(0)
  • 2020-12-07 15:07

    I reinstalled Xcode from App Store which solved this issue. I guess my previous installation is not complete install

    0 讨论(0)
  • 2020-12-07 15:08

    It appears that OSX has changed xcodebuild to require XCode to be installed, where before it functioned properly with only the OSX Command Line Tools installed.

    Old semi-related answer

    Many people ran into this with Node. Node's build tool, gyp, uses xcodebuild to prepare for compiling node packages. Mavericks has changed the behavior of xcodebuild so that it no longer works properly with gyp. This is being fixed at the moment. See the node-gyp issue

    Once the changes have been deployed to NPM, you will be able to install the new node-gyp package and compile properly. You will also need to update your NPM version once the changes are incorporated into NPM.

    0 讨论(0)
  • 2020-12-07 15:10

    Today I had this issue and the problem was I was using a manual install of xcode and had the file named Xcode8.3.2.app instead of Xcode.app. Renaming the app fixed the issue of xcode-select complaining. This seems to indicate the regular appname is on its search path but variants are not.

    0 讨论(0)
提交回复
热议问题