macOS 10.14(beta) How to install Command_Line_Tools_macOS_10.14_for_Xcode_10_Beta

左心房为你撑大大i 提交于 2019-12-03 05:41:52

问题


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";

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

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

回答1:


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



回答2:


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.




回答3:


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 /



回答4:


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




回答5:


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




回答6:


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.



来源:https://stackoverflow.com/questions/50925160/macos-10-14beta-how-to-install-command-line-tools-macos-10-14-for-xcode-10-bet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!