I updated Xcode from AppStore but I couldn't open it due to this error message:
"Loading a plug-in failed
The plug-in or one of its prerequisite plug-ins may be missing or damaged and may need to be reinstalled"
I tried uninstalling Xcode by deleting it from Application folder and reinstall it but the problem is still the same.
Can anyone figure out what's wrong, and how to fix this? Thank you.
问题:
回答1:
Did you by any chance update your Python? Anyway, I did and I think I also removed python 2.7 for some reason. Turns out, Xcode uses python 2.7 and is required for Xcode 6.0 onwards.
Simply download python 2.7, install it and all should be good.
回答2:
I have run into the exact same issue with XCode 6.3 and brew upgrade python
to version 2.7.10.
For whatever reason the symlinks at /System/Library/Frameworks/Python.framework/Versions/
were not updated...
The fix:
sudo rm -f /System/Library/Frameworks/Python.framework/Versions/2.7
sudo ln -s /usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7 /System/Library/Frameworks/Python.framework/Versions/2.7
sudo rm -f /System/Library/Frameworks/Python.framework/Versions/Current
sudo ln -s /usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7 /System/Library/Frameworks/Python.framework/Versions/Current
(obviously your paths/versions might differ)
And then XCode starts working again.
回答3:
For me the problem had to do with a missing iTunes.app. I had previously deleted iTunes, but it turns out that Xcode 9 (and possibly Xcode 8) needs the iTunes.app, and will fail with the mysterious "Loading a plug-in failed" error if iTunes is missing on your system.
Downloading and installing iTunes from https://www.apple.com/ca/itunes/download/ solved the issue for me.
By the way, you may be able to get more info about what's causing the plug-in error by running xcodebuild
on the command line.