23

As the Title of my question, I don't know how to install the Command_Line_Tools_macOS_10.14_for_Xcode_10_Beta for my mac, please help.

What I did:

  1. run command "brew install carthage" to install the Carthage, get errors:

Error: Your Xcode (9.4.1) is too outdated. Please update to Xcode 10.0 (or delete it). Xcode can be updated from https://developer.apple.com/download/more/

  1. run command "xcode-select --install" in Terminal as the second answer from @Dev, but I still get the same errors after "brew install carthage";

error

  1. download the .dmg file from Apple site, I got too many tools after I opened it:

tools

I've tried install the two .pkg which marked with red rectangle in the attached image, but the error still coming.

Environment:

macOS 10.14 Beta
Xcode(Installed 2 versions on the Mac): 
10 (Beta), 
9.4.1
Raniys
  • 1,591
  • 2
  • 16
  • 30
  • Installing XCode 10 beta as instructed here: https://stackoverflow.com/a/50791809/1330283 worked for me. – Ev Haus Jul 03 '18 at 15:33
  • 2
    [**Do not post images of code or errors!**](https://meta.stackoverflow.com/q/303812/995714) Images and screenshots can be a nice addition to a post, but please make sure the post is still clear and useful without them. If you post images of code or error messages make sure you also copy and paste or type the actual code/message into the post directly. – Rob Jul 14 '18 at 13:50

6 Answers6

31

It looks like you have two versions of the xcode installed on your machine. First select the latest version of the xcode by running this command:

sudo xcode-select -switch <path/to/>Xcode.app

Once this is done, install the required command line tools but running this command:

xcode-select --install
Vighnesh Pai
  • 1,675
  • 13
  • 37
  • 3
    Thanks for you answer, the command "sudo xcode-select -switch /Applications/Xcode-beta.app" looks working for me. – Raniys Jun 19 '18 at 12:44
  • BTW, I still do not know how to install the command line tool from Command_Line_Tools_macOS_10.14_for_Xcode_10_Beta.dmg – Raniys Jun 19 '18 at 12:44
  • 1
    This didn't work for me. I'm on Mojave. Tried also to uninstall Xcode 10 and delete to re install the toolchain. nothing worked. still having the same error message. Any idea? – Giuseppe Lanza Jun 27 '18 at 13:48
  • 1
    For the Mojave OS, try installing the command line tools downloaded from Apple developer program site. – Vighnesh Pai Jun 27 '18 at 13:55
  • 1
    This didn't work for me on Mojave public beta either. – Ev Haus Jun 29 '18 at 23:03
16

This worked for me:

  1. Download "Xcode 10.0 Beta" from https://developer.apple.com/download/
  2. Unzip it and move it to /Applications
  3. Download "Command Line Tools (macOS 10.14) for Xcode 10 Beta" from https://developer.apple.com/download/more/
  4. Run the installer for "Command Line Tools"
  5. Launch the Xcode-beta application and wait for it to install necessary packages when it prompts it at launch
  6. Run this from the command line sudo xcode-select -switch /Applications/Xcode-beta.app/

Now brew update should work again.

Ev Haus
  • 1,447
  • 1
  • 10
  • 22
13

This fixed things for me, on a fresh 10.14 Beta 3 install.

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
Roshana Pitigala
  • 7,058
  • 8
  • 38
  • 66
Weblogix
  • 139
  • 2
  • installing Xcode 10.0 beta, and performing the above steps from Ev Haus, xcode-select ---switch /Applications/Xcode-beta.app/ and this step worked this is good, please do this before attempting to install Homebrew from the brew install script. – Rob Mcelvenny Jul 08 '18 at 23:06
  • Tried this but it breaks the system update next time. Had to reinstall old xcode to fix that. – Praveen Puglia Aug 22 '18 at 06:40
  • Thank you! I was trying and failing to `pip install libsass` for python. After running this command, the build succeeded. – shacker Oct 11 '18 at 06:23
8

Following worked for me:

After you updated to Mojave 10.14 Go to https://developer.apple.com/download/more/ search for "command line" then

download "Command line tool for MacOS 10.14"

Once dmg is downloaded install the package.

Verify package installation enter image description here

Jyoti Prakash
  • 3,429
  • 3
  • 19
  • 24
3

There is an issue with Beta 3 and Homebrew. I literally spent 2 hours trying everything listed here to no avail. I was only able to make it work by installing Beta 2, installing Homebrew and then updating to Beta 3.

Homebrew and Beta 3 - Command Line Tools

Jose Orihuela
  • 737
  • 5
  • 4
0

In the terminal run the command:

sudo xcode-select -switch /Applications/Xcode-beta.app

note: xcode-select --install command is deprecated, but the command line tools should installed already.

Federico
  • 185
  • 1
  • 5
  • @whenov not sure, but that’s the message you get. I think it’s related to how system software updates are now managed by the system and not the App Store (including command line tools) – Federico Nov 03 '18 at 15:31
  • On my newly-updated Mojave system, after I launched XCode and let it update, then `xcode-select --install` and it worked. – Dave Everitt Dec 24 '18 at 16:20