XCode 4 installation fails with error

XCode, the developer tools suite provided by Apple is available to registered Apple Developers for free. If you are not a registered developer with Apple, you can still get XCode for a small fee through the App Store. But unlike many of the app store applications, clicking the “Install” button under the XCode description does not directly result in a working application appearing in your dock. The icon for an XCode installer shows up there instead. And that can installer isn’t trouble-free.

When I tried to run the XCode installer, it failed when it was nearly done, and displayed a message to go look for an error in the log (/var/log/install.log) where I found errors like this:

Xcode install Underlying Error=(Error Domain=NSPOSIXErrorDomain…

A quick search of the Apple discussions showed that many people are having the same problem. Possible fixes include:

  1. restarting your computer
  2. Right click on the installer, select “Show Content” then find and launch the real installer (see below*)
  3. freeing up space on their hard drive, and
  4. simply trying the install again

What worked for me was simply trying again – it installed fine this time.

*The launch procedure for option 2 is:

  1. Go to Applications-folder. Find “Install Xcode”.
  2. Right-click and choose “Show Content” (or something, swedish language activated).
  3. Go to Contents > Resources and doubleclick Xcode and iOS SDK.mpkg.
  4. XCode should now install.

(thanks to
mkeriksson )