Xcode 8命令行工具丢失(Git,Clang等) [英] Xcode 8 Command Line Tools Missing (Git, Clang, etc)

查看:140
本文介绍了Xcode 8命令行工具丢失(Git,Clang等)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

两天前,我升级到了OSX Sierra.之后,我的开发工具似乎运行良好.

Two days ago, I upgraded to OSX Sierra. My development tools seemed to be working fine after that.

但是,今天我升级了Xcode 7.3.1-> 8.1,以使某些功能适用于React-Native开发.确切地说,我删除了7.3.1并重新安装了8.1.那是灾难开始的地方.

However, today I upgraded Xcode 7.3.1 -> 8.1 to make certain features work for React-Native development. To be precise, I deleted the 7.3.1 and installed 8.1 anew. That is where the woes had started.

尤其是,似乎大多数命令行工具都已消失.尝试使用git以及其他命令时出现错误.从.dmg文件安装后,我能够恢复Git.

In particular, it seems that most of the Command Line Tools are gone. I get errors when trying to use git as well as other commands. I was able to get Git back after installing from .dmg file.

我也尝试使用xcode-select --install安装命令行工具无济于事.安装继续进行,但是之后没有任何工具可用.

I have also tried installing Command Line Tools using xcode-select --install to no avail. Installation proceeds, but none of the tools become available afterwards.

作为正在发生的事的一个示例,以下是我在运行时收到的错误:curl -sSL https://get.rvm.io | bash -s stable --ruby

As an example of what is happening, the following are the errors I receive when running: 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上设置开发环境吗?

Does someone know what the issue might be and how one goes about getting the development environment set up on Sierra + Xcode 8.1?

推荐答案

在安装新版本的Xcode后发生此错误.

This error occurred after installing the new version of Xcode.

重新启动对我有帮助.有时,即使退出并重新启动终端也可能有帮助.

Just restarting helped for me. Sometimes, even quitting and restarting Terminal might also help.

这篇关于Xcode 8命令行工具丢失(Git,Clang等)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆