安装 4.3.1 后卸载 Xcode 4.2.1

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

Uninstall Xcode 4.2.1 after installing 4.3.1

xcodeosx-lionuninstall

提问by ima747

I begrudgingly updated to Lion from snow leopard. I then updated XCode to 4.3.1 which as part of the update uninstalled 4.2 from snow leopard. I then realized that one of my other dev tools does not work with 4.3.1 at all, so I installed 4.2.1 along side it in the hopes of fixing things. It didn't. How do I remove 4.2.1 so I'm just left with 4.3.1? I tried deleting 4.3.1 and re-installing hoping it would detect 4.2.1 and remove it like it did when I first upgraded but no dice. Searching the web shows I need to run uninstall-devtools however I can't find it anywhere, /Developer doesn't exist... Trying to re-install 4.2.1 in the hopes there was an uninstaller buried in there says "Xcode install assistant can't be installed because xcode is already installed" (it didn't say this the first time obviously) so I can't re-install without 4.3.1 in place in the hopes of getting a /Developer folder... There appears to be no uninstall-devtools burried in 4.3.1 (and I have command line tools installed as well). I can't find 4.2.1, maybe it didn't install (I forgot to check disc capacities before/after) but then why can't I try to install it again without any xcode installed?

我不情愿地从雪豹升级到狮子。然后我将 XCode 更新到 4.3.1,它作为更新的一部分从雪豹中卸载了 4.2。然后我意识到我的其他开发工具之一根本不适用于 4.3.1,所以我安装了 4.2.1,希望能解决问题。它没有。我如何删除 4.2.1 所以我只剩下 4.3.1?我尝试删除 4.3.1 并重新安装,希望它能检测到 4.2.1 并像我第一次升级时那样删除它,但没有骰子。搜索网络显示我需要运行卸载开发工具,但是我在任何地方都找不到它,/Developer 不存在......试图重新安装 4.2.1,希望那里有一个卸载程序说“Xcode无法安装安装助手,因为已经安装了 xcode”(显然不是第一次这么说)所以我可以' t 在没有 4.3.1 的情况下重新安装,希望得到一个 /Developer 文件夹...... 4.3.1 中似乎没有埋藏的卸载开发工具(我也安装了命令行工具)。我找不到 4.2.1,也许它没有安装(我忘记检查之前/之后的磁盘容量)但是为什么我不能在没有安装任何 xcode 的情况下再次尝试安装它?

采纳答案by ima747

It turns out that 4.2.1's installer actually installs an Xcode installer into your applications folder, which in turn actually installs Xcode. The solution is find the installed installer (makes so much sense...) and install Xcode an things behave as expected.

事实证明,4.2.1 的安装程序实际上将 Xcode 安装程序安装到您的应用程序文件夹中,而后者实际上安装了 Xcode。解决方案是找到已安装的安装程序(非常有意义......)并安装 Xcode 并按预期运行。

回答by Valery Viktorovsky

Install Xcode 4.2.1 again and then uninstall it:

再次安装 Xcode 4.2.1,然后卸载它:

sudo /Developer/Library/uninstall-devtools --mode=all

回答by radven

The versions of Xcode that support installation into /Applications instead of /Developer in theory support being removed just via dragging to the trash.

理论上支持安装到 /Applications 而不是 /Developer 的 Xcode 版本支持通过拖动到垃圾箱来删除。

In practice, I'm not sure I trust the process, and I wish there was still a more robust cleanup script.

在实践中,我不确定我是否信任这个过程,我希望还有一个更强大的清理脚本。

回答by mustafarslan

Search "Xcode 4.2" in spotlight or in finder it will find you the app then move it to trash .But dont forget to check version.

在聚光灯下或在查找器中搜索“Xcode 4.2”,它会找到您的应用程序,然后将其移至垃圾箱。但不要忘记检查版本。