Xcode 无法启动,停留在“正在验证“Xcode”...”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25996484/
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
Xcode won't start, stuck on 'Verifying "Xcode"...'
提问by Jeffrey
I've installed Xcode on a mac and when I try to start it I get a little window open saying 'Verifying Xcode' with a status bar scrolling across, anyone got a fix rather than reinstalling?
我已经在 Mac 上安装了 Xcode,当我尝试启动它时,我打开了一个小窗口,上面写着“验证 Xcode”,状态栏滚动,有没有人得到修复而不是重新安装?
回答by Mustafa
If you don't want to wait forever, this might help:
如果您不想永远等待,这可能会有所帮助:
xattr -d com.apple.quarantine '/Applications/Xcode.app'
回答by Henry F
Running a command to get through Gatekeeper sounds like the way to go, since you downloaded it from a trusted source. This is a common occurrence when installing large bundles in Mac OS X. Basically, Gatekeeper examines your entire bundle, making sure that there is no suspicious code. This is one of the many things that keeps Mac OS X as secure as it is. You have two options:
运行命令以通过 Gatekeeper 听起来像是要走的路,因为您是从可信来源下载的。在 Mac OS X 中安装大型包时,这种情况很常见。基本上,Gatekeeper 会检查您的整个包,确保没有可疑代码。这是保持 Mac OS X 安全的众多因素之一。您有两个选择:
1: Give it time.
1:给它时间。
Or,
或者,
2: Manually tell Gatekeeper "It's okay, this is from a trusted source". How do we do this? Well, first fire up the Terminal and navigate to your Xcode.app folder. (Or type in cd
and drag-and-drop Xcode from your applications folder), then hit enter.
Next, run the command:
2:手动告诉网守“没关系,这是来自可信赖的来源”。我们如何做到这一点?好吧,首先启动终端并导航到您的 Xcode.app 文件夹。(或输入cd
并从您的应用程序文件夹中拖放 Xcode),然后按 Enter。接下来,运行命令:
xattr -d com.apple.quarantine Xcode.app
Now, be careful getting past Gatekeeper if whatever you are installing is even slightlyfrom an untrusted source, or else you introduce a security risk to your computer. In my case, opening new versions of Xcode quickly is the only time I will ever run that command.
现在,如果不管你正在安装,即使是要小心越来越近守略微来自不受信任来源,否则你介绍安全风险到您的计算机。就我而言,快速打开新版本的 Xcode 是我唯一一次运行该命令的时间。
回答by Caleb
anyone got a fix rather than me reinstalling?
有没有人得到修复而不是我重新安装?
For anyone else seeing a very long "Verifying Xcode" phase, just give it time. The indeterminate progress bar stays up there for a long time (tens of minutes) while Gatekeeper looks at the (very large) Xcode bundle to make sure that it's legit. Eventually, you'll get the familiar message along the lines of "This application was downloaded from the Internet. Do you want to continue?" Or, if the bundle doesn't check out, you'll of course get a message to that effect.
对于其他人看到很长的“验证 Xcode”阶段,给它时间。不确定的进度条会在那里停留很长时间(几十分钟),而 Gatekeeper 查看(非常大的)Xcode 包以确保它是合法的。最终,您会看到类似“此应用程序是从 Internet 下载的。要继续吗?”这样的熟悉消息。或者,如果捆绑包没有签出,您当然会收到一条消息。
回答by GingerBreadMane
Almost every answer here recommends running xattr -d
on the file. This deletes the file's extended attributes (like com.apple.quarantine) so OSX will not run the verification phase. You should only do this as an absolute last resort if at all. Apple explicitly recommendsleaving Gatekeeper enabled to validate your version of Xcode after XcodeGhost malwarewas spread to popular iOS apps via infected versions of Xcode.
几乎这里的每个答案都建议xattr -d
在文件上运行。这会删除文件的扩展属性(如 com.apple.quarantine),因此 OSX 将不会运行验证阶段。如果有的话,您应该只将其作为绝对的最后手段。Apple明确建议在XcodeGhost 恶意软件通过受感染的 Xcode 版本传播到流行的 iOS 应用程序后,启用 Gatekeeper 以验证您的 Xcode版本。
If you're stuck trying unarchive an Xcode beta .xip archive, try this:
如果您在尝试取消存档 Xcode beta .xip 存档时遇到困难,请尝试以下操作:
- Open the Archive Utility app. (Open Finder by hitting ?+spacebar and type "Archive Utility")
- Choose File->Expand Archive and select the Xcode archive.
- 打开存档实用程序应用程序。(按 ?+空格键打开 Finder 并输入“存档实用程序”)
- 选择 File->Expand Archive 并选择 Xcode 存档。
回答by Jayprakash Dubey
I had same issue. Quick fix is to open terminal
from application or type terminal in spotlight and enter below command.
我有同样的问题。快速修复是terminal
从应用程序打开或在聚光灯下键入终端并输入以下命令。
cd /Applications
- This will move to applications directory where Xcode is present
cd /Applications
- 这将移动到 Xcode 所在的应用程序目录
xattr -d com.apple.quarantine Xcode.app
- This will bypass Gatekeeper in OS X and will launch Xcode quickly
xattr -d com.apple.quarantine Xcode.app
- 这将绕过 OS X 中的 Gatekeeper 并快速启动 Xcode
Note:If you have changed name of Xcode (say Xcode7-1) then you should enter ... Xcode7-1.app command. Refer screenshot
注意:如果您更改了 Xcode 的名称(比如 Xcode7-1),那么您应该输入 ... Xcode7-1.app 命令。参考截图
回答by shyla
open terminal -
打开终端 -
1.Type cddrag drop your xcode (for path) then enter
1.键入cddrag drop your xcode (for path) 然后输入
2.next xattr -d com.apple.quarantine Xcode.appenter
2.next xattr -d com.apple.quarantine Xcode.app输入
agree for terms and condition
同意条款和条件
回答by Dowland Aiello
For Xcode 8: To skip the verifying process on El Capitan for Xcode 8, download Xcode 8 at the developer downloads page, then open terminal.
对于 Xcode 8:要跳过 El Capitan 上的 Xcode 8 验证过程,请在开发人员下载页面下载 Xcode 8,然后打开终端。
Following this, type
在此之后,键入
xattr -d com.apple.quarantine
Then drag your xcode 8 download into your terminal window. It should look like this:
然后将您的 xcode 8 下载拖到您的终端窗口中。它应该是这样的:
回答by simioliolio
A lot of talk here about exempting Xcode-beta.app from Gatekeeper, but for me, I had to make the .xip file exempt.
这里有很多关于从 Gatekeeper 中免除 Xcode-beta.app 的讨论,但对我来说,我必须免除 .xip 文件。
I placed Xcode_8_beta_6.xip into /Applications, then in Terminal, changed directory to /Applications and ran:
我将 Xcode_8_beta_6.xip 放入 /Applications,然后在终端中,将目录更改为 /Applications 并运行:
xattr -d com.apple.quarantine Xcode_8_beta_6.xip
Then double clicked the .xip to get it to unpack.
然后双击 .xip 以将其解压缩。
回答by Ola Peters
running xattr -d com.apple.quarantine Xcode.app
worked like a charm. Waiting on the "verifying xcode"
didn't work, as it never completed.
跑步xattr -d com.apple.quarantine Xcode.app
就像一种魅力。等待"verifying xcode"
没有用,因为它从未完成。
回答by Andrii Vasyliev
Also you can remove Open Warning for entire directory Applications via the command in the terminal:
您也可以通过终端中的命令删除整个目录应用程序的打开警告:
xattr -d -r com.apple.quarantine ~/Applications