问题描述
将 MacOS 升级到 High Sierra 后,我尝试更新 Xcode 并得到这个:
After upgrading MacOS to High Sierra, I tried to update Xcode and get this:
Xcode 下载失败.使用购买"页面重试
我卸载了 Xcode 并尝试重新安装,但没有成功.
I uninstalled Xcode and try to install again with no success.
我阅读了一些解决此问题的技巧,但没有任何帮助...
I read some tips to solve this but nothing helps...
- 删除 ~/Library/Cookies/com.apple.appstore.plist(没有这样的文件)
使用 AppStore 调试菜单...(菜单永远不会与启用它的命令一起出现)
- Remove ~/Library/Cookies/com.apple.appstore.plist (no such file)
Use AppStore Debug menu... (menu never appears with the command to enable it)
默认写入 com.apple.appstore ShowDebugMenu -bool true
defaults write com.apple.appstore ShowDebugMenu -bool true
删除/private/var/folders///C/com.apple.appstore 的内容(文件夹已找到,内容已删除,没有任何变化)
Remove contents of /private/var/folders///C/com.apple.appstore (folder located, contents removed, nothing changes)
是的,驱动器有足够的空间
Yes, the drive has enough space
推荐答案
我遇到了同样的问题,最终使这个工作正常,但是我不确定是哪个步骤使它起作用,所以我将它们全部发布.
I had the same issue and finally got this working, however I'm not sure exactly which step made it work, so I'm posting all of them.
删除:
~/Library/Caches/com.apple.appstore
~/Library/Caches/storeaccount
~/Library/Caches/storeassets
~/Library/Caches/storedownload
~/Library/Caches/storeinappd
我没有这些文件夹中的一些,但我确实有一些看起来很可疑的额外内容,所以我也删除了它们:
I didn't have some of those folders, but I did have a couple of extras that looked fishy, so I deleted them too:
~/Library/Caches/storeassetd
~/Library/Caches/storedownloadd
运行 sudo softwareupdate --clear-catalog
[注意:我做了这个,但我认为它没有帮助]
来自 http://osxdaily.com/2016/10/08/mac-app-store-temp-cache-folder/(释义):
- 退出 Mac App Store
- 打开终端并运行
open $TMPDIR../C/com.apple.appstore/
- 点击 Return,
com.apple.appstore
文件夹将在 Mac OS 的 Finder 中打开 - 删除此文件夹的内容
- Quit out of the Mac App Store
- Open Terminal and run
open $TMPDIR../C/com.apple.appstore/
- Hit Return and the
com.apple.appstore
folder will open in the Finder of Mac OS - Delete the contents of this folder
最后:
- 在 Finder 中导航到
~/Applications
并将 Xcode 移动到垃圾箱 [注意:这一步对我来说是必要的,但是 ymmv] - 重启
- 启动 App Store.搜索 Xcode.全新安装.
- Navigate to
~/Applications
in Finder and move Xcode to the Trash [Note: This step was necessary for me, but ymmv] - Reboot
- Launch App Store. Search for Xcode. Install it fresh.
这篇关于Xcode 下载失败.使用“购买"页面重试.Xcode 9.3.MacOS 高山脉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!