我对 xcode-select -switch 使用什么设置?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11716110/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 01:04:12  来源:igfitidea点击:

What do setting do I use for xcode-select -switch?

xcodeosx-mountain-lion

提问by jonderry

I'm trying to install octave on macos mountain lion via the following:

我正在尝试通过以下方式在 macos 山狮上安装八度音程:

sudo port install octave

However, the result of this command is always the following:

但是,此命令的结果始终如下:

Error: 
Error: No valid Xcode installation is properly selected.
Error: Please use xcode-select to select an Xcode installation:
Error:     sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer # version 4.4
Error: 

I've tried the suggested sudo xcode-select -switchcommand to no avail. The same error always occurs. Any ideas how to resolve this problem?

我试过建议的sudo xcode-select -switch命令无济于事。总是出现同样的错误。任何想法如何解决这个问题?

回答by Tom Rossi

Did you install xcode or just the command line tools?

您安装了 xcode 还是仅安装了命令行工具?

I installed just the command line tools and was able to trick some GEMS by using the following command:

我只安装了命令行工具,并能够通过使用以下命令来欺骗一些 GEMS:

sudo xcode-select -switch /usr/bin

I basically pointed them to the bin folder where my GCC lives.

我基本上将它们指向我的 GCC 所在的 bin 文件夹。

回答by kamal

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

solved for me

为我解决了