在 Sierra 上,单独的 Xcode 安装错误是不够的
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/47569264/
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
Brew Install Error Xcode alone is not sufficient on Sierra
提问by Theo Sweeny
I'm attempting to install a package on Mac OSX Serra v10.12.6 running xCode v9.1 using HomeBrew v1.3.8.
我正在尝试使用 HomeBrew v1.3.8 在运行 xCode v9.1 的 Mac OSX Serra v10.12.6 上安装一个软件包。
The install and error is
安装和错误是
TS-Mac-Pro > brew install dos2unix
Error: Xcode alone is not sufficient on Sierra.
Install the Command Line Tools:
xcode-select --install
Then I run the command
然后我运行命令
xcode-select --install
which says the command line tool package is not available from the software update server.
这表示无法从软件更新服务器获得命令行工具包。
Which I go into xCode it shows that the command line tools are installed.
我进入 xCode 它显示命令行工具已安装。
TS-Mac-Pro > xcode-select -p
/Applications/Xcode.app/Contents/Developer
Any help would be much appreciated.
任何帮助将非常感激。
Theo
提奥
回答by Theo Sweeny
I went to Apple Developer website and downloaded the Command Line Tools dmg directly. An Apple account first needs to be setup.
我去了Apple Developer网站并直接下载了命令行工具dmg。首先需要设置一个苹果账户。
The Command Line Tools can be found under -
命令行工具可以在下面找到 -
https://developer.apple.com/download/more/
https://developer.apple.com/download/more/
Install downloaded dmg and volia - HomeBrew is back up and running.
安装下载的 dmg 和 volia - HomeBrew 已备份并运行。
回答by Dominik
I just fixed this issue by deleting the current install of the command line tools and reinstalling them. See commands below:
我只是通过删除命令行工具的当前安装并重新安装它们来解决这个问题。请参阅以下命令:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
This fixed the issue for me in the end
这最终为我解决了问题