Xcode 11安装组件失败(An unknown error occurred. See the install log for more details.)

4,348 阅读1分钟

An unknown error occurred. See the install log for more details
背景

Xcode 11.1安装组件时失败,报错信息为 An unknown error occurred. See the install log for more details.

解决方案

来源于StackOverflow Darren的实践

  • This problem has once again appeared in Xcode 11.1 and is caused by an invalid certificate that expired some day in October 2019.
  • You can work around the problem by temporarily changing the system date to before the certificate expiration date.
  • In the case of Xcode 11, set the system date to Oct 3, 2019, run Xcode, then change the date back after the components have installed.

译文:

  • 这个问题再次在Xcode 11.1出现,是有个证书在2019年的10月份某天过期引起的。
  • 你可以通过暂时把系统日期修改到过期的日期之前来解决。
  • 在Xcode 11这个版本下,设置系统日期为2019年10月3日,然后运行Xcode,再安装组件,(就可以安装成功了),完成之后再把系统日期改回正常状态。

详细操作截图如下

  • 1.系统设置->日期与时间

Mac设置日期

  • 2.点击解锁

Mac点击解锁日期与时间

  • 3.去掉自动设置日期与时间,修改为10月3日之前(随便)

修改为10月3日之前

  • 4.打开Xcode, 点击Install即可安装成功。

Xcode安装组件Install  additional required components

  • 5.将系统日期勾回自动即可。

END