xcode macOS 10.14(beta) 如何安装 Command_Line_Tools_macOS_10.14_for_Xcode_10_Beta
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/50925160/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
macOS 10.14(beta) How to install Command_Line_Tools_macOS_10.14_for_Xcode_10_Beta
提问by Raniys
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.
作为我的问题的标题,我不知道如何为我的 mac 安装 Command_Line_Tools_macOS_10.14_for_Xcode_10_Beta,请帮忙。
What I did:
我做了什么:
- run command "brew install carthage" to install the Carthage, get errors:
- 运行命令“brew install carthage”来安装 Carthage,得到错误:
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/
错误:您的 Xcode (9.4.1) 太旧了。请更新到 Xcode 10.0(或将其删除)。Xcode 可以从https://developer.apple.com/download/more/更新
- run command "xcode-select --install" in Terminal as the second answer from @Dev, but I still get the same errors after "brew install carthage";
- 在终端中运行命令“xcode-select --install”作为@Dev的第二个答案,但在“brew install carthage”之后我仍然遇到相同的错误;
- download the .dmg file from Apple site, I got too many tools after I opened it:
- 从Apple网站下载.dmg文件,打开后我得到了太多工具:
I've tried install the two .pkg which marked with red rectangle in the attached image, but the error still coming.
我已经尝试安装在附图中标有红色矩形的两个 .pkg,但错误仍然存在。
Environment:
环境:
macOS 10.14 Beta
Xcode(Installed 2 versions on the Mac):
10 (Beta),
9.4.1
回答by Vighnesh Pai
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:
看起来您的机器上安装了两个版本的 xcode。首先通过运行以下命令选择最新版本的 xcode:
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
回答by Ev Haus
This worked for me:
这对我有用:
- Download "Xcode 10.0 Beta" from https://developer.apple.com/download/
- Unzip it and move it to
/Applications
- Download "Command Line Tools (macOS 10.14) for Xcode 10 Beta" from https://developer.apple.com/download/more/
- Run the installer for "Command Line Tools"
- Launch the
Xcode-beta
application and wait for it to install necessary packages when it prompts it at launch - Run this from the command line
sudo xcode-select -switch /Applications/Xcode-beta.app/
- 从https://developer.apple.com/download/下载“Xcode 10.0 Beta”
- 解压缩并将其移动到
/Applications
- 从https://developer.apple.com/download/more/下载“适用于 Xcode 10 Beta 的命令行工具 (macOS 10.14)”
- 运行“命令行工具”的安装程序
- 启动
Xcode-beta
应用程序并等待它在启动时提示它安装必要的包 - 从命令行运行它
sudo xcode-select -switch /Applications/Xcode-beta.app/
Now brew update
should work again.
现在brew update
应该再次工作。
回答by Weblogix
This fixed things for me, on a fresh 10.14 Beta 3 install.
在全新的 10.14 Beta 3 安装中,这对我来说是固定的。
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
回答by Jyoti Prakash
Following worked for me:
以下对我来说有效:
After you updated to Mojave 10.14Go to https://developer.apple.com/download/more/search for "command line"then
更新到Mojave 10.14 后转到https://developer.apple.com/download/more/搜索“命令行”然后
download "Command line tool for MacOS 10.14"
下载“ MacOS 10.14 命令行工具”
Once dmg is downloaded install the package.
下载 dmg 后,安装该软件包。
回答by Jose Orihuela
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.
Beta 3 和 Homebrew 存在问题。我真的花了 2 个小时尝试这里列出的所有内容都无济于事。我只能通过安装 Beta 2、安装 Homebrew 然后更新到 Beta 3 来使其工作。
回答by Federico
In the terminal run the command:
在终端中运行命令:
sudo xcode-select -switch /Applications/Xcode-beta.app
sudo xcode-select -switch /Applications/Xcode-beta.app
note:xcode-select --install
command is deprecated, but the command line tools should installed already.
注意:xcode-select --install
command 已弃用,但应已安装命令行工具。