更新到 MacOS Catalina 后 Xcode 无法打开
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/58689699/
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 not opening after updating to MacOS Catalina
提问by NSNoob
I updated to MacOS Catalina and now my Xcode is not opening. I get this prompt:
我更新到 MacOS Catalina,现在我的 Xcode 没有打开。我得到这个提示:
Which leads to this error after getting root access:
获得root访问权限后会导致此错误:
There is a huge log but the key errors are:
有一个巨大的日志,但关键错误是:
2019-11-04 12:39:48+05 tk_lpt_0141_wifi Xcode[1214]: Package: PKLeopardPackage Failed to verify with error: Error Domain=PKInstallErrorDomain Code=102 "The package “MobileDeviceDevelopment.pkg” is untrusted." UserInfo={NSLocalizedDescription=The package “MobileDeviceDevelopment.pkg” is untrusted., NSURL=MobileDeviceDevelopment.pkg -- file:///Applications/Xcode.app/Contents/Resources/Packages/, PKInstallPackageIdentifier=com.apple.pkg.MobileDeviceDevelopment, NSUnderlyingError=0x7fe07012cad0 {Error Domain=NSOSStatusErrorDomain Code=-2147409654 "CSSMERR_TP_CERT_EXPIRED" UserInfo={SecTrustResult=5, PKTrustLevel=PKTrustLevelExpiredCertificate, NSLocalizedFailureReason=CSSMERR_TP_CERT_EXPIRED}}} 2019-11-04
13:01:20+05 tk_lpt_0141_wifi Xcode[1306]: Package: PKLeopardPackage Failed to verify with error: Error Domain=PKInstallErrorDomain Code=102 "The package “MobileDeviceDevelopment.pkg” is untrusted." UserInfo={NSLocalizedDescription=The package “MobileDeviceDevelopment.pkg” is untrusted., NSURL=MobileDeviceDevelopment.pkg -- file:///Applications/Xcode.app/Contents/Resources/Packages/, PKInstallPackageIdentifier=com.apple.pkg.MobileDeviceDevelopment, NSUnderlyingError=0x7fd230cb1ae0 {Error Domain=NSOSStatusErrorDomain Code=-2147409654 "CSSMERR_TP_CERT_EXPIRED" UserInfo={SecTrustResult=5, PKTrustLevel=PKTrustLevelExpiredCertificate, NSLocalizedFailureReason=CSSMERR_TP_CERT_EXPIRED}}} 2019-11-04
13:29:51+05 tk_lpt_0141_wifi Xcode[1377]: Package: PKLeopardPackage Failed to verify with error: Error Domain=PKInstallErrorDomain Code=102 "The package “MobileDeviceDevelopment.pkg” is untrusted." UserInfo={NSLocalizedDescription=The package “MobileDeviceDevelopment.pkg” is untrusted., NSURL=MobileDeviceDevelopment.pkg -- file:///Applications/Xcode.app/Contents/Resources/Packages/, PKInstallPackageIdentifier=com.apple.pkg.MobileDeviceDevelopment, NSUnderlyingError=0x7f8ab8ba9380 {Error Domain=NSOSStatusErrorDomain Code=-2147409654 "CSSMERR_TP_CERT_EXPIRED" UserInfo={SecTrustResult=5, PKTrustLevel=PKTrustLevelExpiredCertificate, NSLocalizedFailureReason=CSSMERR_TP_CERT_EXPIRED}}}
2019-11-04 12:39:48+05 tk_lpt_0141_wifi Xcode[1214]:包:PKLeopardPackage 验证失败,错误:Error Domain=PKInstallErrorDomain Code=102“包“MobileDeviceDevelopment.pkg”不受信任。UserInfo={NSLocalizedDescription=包“MobileDeviceDevelopment.pkg”不受信任。, NSURL=MobileDeviceDevelopment.pkg -- file:///Applications/Xcode.app/Contents/Resources/Packages/, PKInstallPackageIdentifier=com.apple.pkg.MobileDeviceDevelopment , NSUnderlyingError=0x7fe07012cad0 {Error Domain=NSOSStatusErrorDomain Code=-2147409654 "CSSMERR_TP_CERT_EXPIRED" UserInfo={SecTrustResult=5, PKTrustLevel=PKTrustLevelExpiredCertificate, NSLocalizedFailureReason}-2147409654“CSSMERR_TP_CERT_EXPIRED”
13:01:20+05 tk_lpt_0141_wifi Xcode[1306]:包:PKLeopardPackage 验证失败,错误:Error Domain=PKInstallErrorDomain Code=102“包“MobileDeviceDevelopment.pkg”不受信任。UserInfo={NSLocalizedDescription=包“MobileDeviceDevelopment.pkg”不受信任。, NSURL=MobileDeviceDevelopment.pkg -- file:///Applications/Xcode.app/Contents/Resources/Packages/, PKInstallPackageIdentifier=com.apple.pkg.MobileDeviceDevelopment , NSUnderlyingError=0x7fd230cb1ae0 {错误域=NSOSStatusErrorDomain 代码=-2147409654 "CSSMERR_TP_CERT_EXPIRED" UserInfo={SecTrustResult=5, PKTrustLevel=PKTrustLevelExpiredCertificate, NSLocalizedCERT_Reason_TP}REX10_CSSMERR_TP_CERT_EXPIRED
13:29:51+05 tk_lpt_0141_wifi Xcode[1377]:包:PKLeopardPackage 验证失败,错误:Error Domain=PKInstallErrorDomain Code=102“包“MobileDeviceDevelopment.pkg”不受信任。UserInfo={NSLocalizedDescription=包“MobileDeviceDevelopment.pkg”不受信任。, NSURL=MobileDeviceDevelopment.pkg -- file:///Applications/Xcode.app/Contents/Resources/Packages/, PKInstallPackageIdentifier=com.apple.pkg.MobileDeviceDevelopment , NSUnderlyingError=0x7f8ab8ba9380 {错误域=NSOSStatusErrorDomain 代码=-2147409654 "CSSMERR_TP_CERT_EXPIRED" UserInfo={SecTrustResult=5, PKTrustLevel=PKTrustLevelExpiredCertificate, NSLocalizedFailureREXPID}
I have already tried:
我已经尝试过:
xcode-select --install
and
和
xcode-select --reset
Has anyone else run into this issue? How to fix it?
有没有其他人遇到过这个问题?如何解决?
回答by Vinod Kumar
First, try updating Xcode through the app store
首先,尝试通过应用商店更新Xcode
As a last resort, you can change your MacOS Date to
作为最后的手段,您可以将您的 MacOS 日期更改为
1st October 2019
I set my system time to 1st October 2019,
the date when the certificate was still valid. Then, I opened Xcode and followed the component install. This went well, and now Xcode works again.
我将系统时间设置1st October 2019,
为证书仍然有效的日期。然后,我打开 Xcode 并按照组件安装进行操作。一切顺利,现在 Xcode 又可以工作了。
Edit and set the date of your Mac as 1st October 2019
.
编辑并将 Mac 的日期设置为1st October 2019
.
回答by Lily Pham
What worked for me was updating Xcode in the App Store. After that I was able to install the additional components successfully.
对我有用的是在 App Store 中更新 Xcode。之后,我能够成功安装附加组件。