Xcode 4.1 Not Installing? Try This.

Apple released OSX Lion earlier today, but Xcode 4.0.2 is not compatible with it. Later in the day, they released Xcode 4.1 for Lion through the Mac App Store. I saw some comments from people saying that at about 80% of the way through the installation, they got a popup telling them they needed to quit iTunes in order to continue, but iTunes wasn’t running. They were unable to continue.

Here’s what they missed: iTunesHelper. This is an additional iTunes process that is running, even when iTunes proper is not. It’s there so that when you attach an iOS device, it can fire up iTunes for you.

Go into Activity Monitor and find iTunesHelper. Select it, and then kill it. After a second or two, the “you need to quit iTunes” dialog will go away, and the installation will complete.