两天前,我升级到了OSX Sierra。在那之后,我的开发工具似乎工作得很好。
然而,今天我升级了Xcode7.3.1 -> 8.1,使某些特性适用于React-Native开发。准确地说,我删除了7.3.1,并重新安装了8.1。这就是灾难开始的地方。
特别是,似乎大多数命令行工具都消失了。我在尝试使用git
和其他命令时出现错误。在从.dmg文件安装后,我能够重新获得Git。
我也尝试过使用xcode-select --install
安装命令行工具,但都无济于事。安装继续进行,但之后所有工具都不可用。
以下是我在运行时收到的错误示例:curl -sSL https://get.rvm.io | bash -s stable --ruby
xcodebuild: error: SDK "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk" cannot be located.
gcc: error: unable to find utility "gcc", not a developer tool or in PATH
configure: error: clang version 3.0 or later is required
有没有人知道问题可能是什么,以及如何在Sierra + Xcode 8.1上设置开发环境?
发布于 2019-07-24 08:07:37
此错误发生在安装新版本的Xcode之后。
重新启动对我很有帮助。有时,即使退出并重新启动终端也可能会有所帮助。
发布于 2016-10-30 10:07:31
问题是您需要将命令行工具重定向到Xcode的新副本。您可以使用xcode-select
来做到这一点,但最简单的方法是,在Xcode中,转到Preferences > Locations并为底部的Command Line Tools弹出菜单选择正确的Xcode。
另外,请注意,为了使用xcode-select
,您需要使用sudo
。
https://stackoverflow.com/questions/40325383
复制相似问题