问题
After upgrading MacOS to High Sierra, I tried to update Xcode and get this:
Xcode failed to download. Use the Purchases page to try again
I uninstalled Xcode and try to install again with no success.
I read some tips to solve this but nothing helps...
- Remove ~/Library/Cookies/com.apple.appstore.plist (no such file)
Use AppStore Debug menu... (menu never appears with the command to enable it)
defaults write com.apple.appstore ShowDebugMenu -bool true
Remove contents of /private/var/folders///C/com.apple.appstore (folder located, contents removed, nothing changes)
- "wiping all caches, cookies amd such like" (how to do that?)
- Reset AppStore (uh?)
- LogOut, quit, restart Mac (done, no changes)
- Quit AppStore process and try again (done, no changes)
- Review payment options (done, no changes)
Yes, the drive has enough space
回答1:
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.
From https://apple.stackexchange.com/questions/245406/how-to-fix-reset-app-store-app-on-mac-osx-el-capitan:
Delete:
~/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
Run sudo softwareupdate --clear-catalog
[Note: I did this but I don't think it helped]
From http://osxdaily.com/2016/10/08/mac-app-store-temp-cache-folder/ (paraphrasing):
- 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
And finally:
- 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.
来源:https://stackoverflow.com/questions/50144017/xcode-failed-to-download-use-the-purchases-page-to-try-again-xcode-9-3-macos