
惊魂
XCode 几乎是咬牙入 MBP 的绝对理由之一!其安装/升级/迁移在国内k级网速环境中一向是种摧悲的体验! 但是,XCode 升级了,我们还是要第一时间高兴的跟上;
- 俺以是通过 AppStore 安装的,用了两个晚上;
- 通知有 4.3 了,自然的,网线连上,睡觉去以
- 第二天,打开 XCode ,怎么还是 4.2?!
- 见 /Applications 中有个当晚更新时间的 Install Xcode.app 自然的想到可能是没有安装成功,点击!等待!
- 再次打开 XCode 还是 4.2!
难道RP 问题!?
- 不信了,根据手工删除 XCode 的方法,清除旧XCode 准备再来一次:
$ sudo /Developer/Library/uninstall-devtools --mode=all
- 嗯嗯嗯?! 怎么 /Applications 中还有一个 XCode ?!
- 点击打开,竟然就是 4.3!
- 正高兴,要用 brew 安装小工具,结果:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb:685: command not found: git status -s Library/Homebrew/ You have no /usr/bin/cc. This will cause numerous build issues. Please reinstall Xcode. "Git" was not found in your path. Homebrew uses Git for several internal functions, and some formulae use Git checkouts instead of stable tarballs. You may want to install git: brew install git It appears that you are using the osx-gcc-installer. This is unsupported, and software that require headers and other resources that are normally provided by Xcode will fail to compile. We recommend that you install Xcode.
惨了!!!
应对
好在有 google 在,搜索就知道,这是 XCode 4.3 发布以来的常见杯具!
- 原来,这是 XCode 好心办的錯事儿:
- 一直有人抱怨,XCode 太独,不跟其它标准 mac 软件一样老实的就在 /Applications 中一个 .app 目录就好
- 于是, 4.3 标准化成了一个正常 .app 可以自然的删除
- 但是, brew 什么的早已习惯了 XCode 原先的目录安排,于是,为了兼容, 4.3 专门发布有:
Command Line Tools for Xcode
- 安装上就一切安定团结了
ps:
- 通过 XCode 内置的下载器,那是杯具! ~ 在中国网速环境里
- 所以,俺建议通过开发者中心,先下载到本地然后自然安装吧!
- 使用 FireFox 的 DownThemAll! 插件,可以获得稳定的 4线程,80K/s 的速度!
参考
+ How to Uninstall XCode
+ How to Uninstall Xcode – faral的专栏 – 博客频道 – CSDN.NET
+ Issue #10244: 10.7 and Xcode 4.3 git install errors · mxcl/homebrew


















