Question

Been battling this for hours. I've downloaded the latest installer from the App Store, hoping to be able to run my code on the device again after updating it to 5.1. Not so fast! I get a cryptic error saying the installation failed. It's almost as if it's telling me "your installation failed because it failed". Thanks, Captain Obvious.

Looking into /var/log/install.log I see this (snippet of the last few lines before failure):

Mar 11 21:11:52 Yuriy-Aleksyeyevs-MacBook-Pro _securityagent[577]: Running Install Scripts . . .
Mar 11 21:11:52 Yuriy-Aleksyeyevs-MacBook-Pro _securityagent[579]: Begin script: AlertAll.sh
Mar 11 21:11:53 Yuriy-Aleksyeyevs-MacBook-Pro installd[567]: ./preinstall: sudo: unknown user: Yuri
Mar 11 21:11:53 Yuriy-Aleksyeyevs-MacBook-Pro _securityagent[582]: End script: AlertAll.sh
Mar 11 21:11:53 Yuriy-Aleksyeyevs-MacBook-Pro _securityagent[583]: Begin script: cleanUp
Mar 11 21:11:53 Yuriy-Aleksyeyevs-MacBook-Pro _securityagent[586]: End script: cleanUp
Mar 11 21:11:53 Yuriy-Aleksyeyevs-MacBook-Pro _securityagent[587]: Begin script: preflight
Mar 11 21:11:53 Yuriy-Aleksyeyevs-MacBook-Pro _securityagent[590]: End script: preflight
Mar 11 21:11:53 Yuriy-Aleksyeyevs-MacBook-Pro _securityagent[591]: Begin script: writelocation
Mar 11 21:11:53 Yuriy-Aleksyeyevs-MacBook-Pro _securityagent[594]: End script: writelocation
Mar 11 21:11:53 Yuriy-Aleksyeyevs-MacBook-Pro _securityagent[595]: Begin script: zzzcleanup
Mar 11 21:11:53 Yuriy-Aleksyeyevs-MacBook-Pro _securityagent[599]: End script: zzzcleanup
Mar 11 21:11:53 Yuriy-Aleksyeyevs-MacBook-Pro _securityagent[600]: 5 Install Scripts run.
Mar 11 21:13:18 Yuriy-Aleksyeyevs-MacBook-Pro installd[567]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “DeveloperTools.pkg”." UserInfo=0x7f9d46575c90 {NSFilePath=./preinstall, NSURL=file://localhost/Applications/Install%20Xcode.app/Contents/Resources/Packages/DeveloperTools.pkg, PKInstallPackageIdentifier=com.apple.pkg.DeveloperToolsLeo, NSLocalizedDescription=An error occurred while running scripts from the package “DeveloperTools.pkg”.} {
        NSFilePath = "./preinstall";
        NSLocalizedDescription = "An error occurred while running scripts from the package \U201cDeveloperTools.pkg\U201d.";
        NSURL = "file://localhost/Applications/Install%20Xcode.app/Contents/Resources/Packages/DeveloperTools.pkg";
        PKInstallPackageIdentifier = "com.apple.pkg.DeveloperToolsLeo";
    }
Mar 11 21:13:18 Yuriy-Aleksyeyevs-MacBook-Pro installer[560]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “DeveloperTools.pkg”." UserInfo=0x7f8bc3197060 {NSFilePath=./preinstall, NSURL=file://localhost/Applications/Install%20Xcode.app/Contents/Resources/Packages/DeveloperTools.pkg, PKInstallPackageIdentifier=com.apple.pkg.DeveloperToolsLeo, NSLocalizedDescription=An error occurred while running scripts from the package “DeveloperTools.pkg”.}
Mar 11 21:13:19 Yuriy-Aleksyeyevs-MacBook-Pro installer[560]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.

I made sure my user name is on the sudoers list. What else could I be missing? I tried installing it after a fresh restart with nothing running but the installer.

PS: I have not tried removing the previous installation of Xcode. I don't ever recall that being necessary, and I'd rather keep developing on the simulator than lose that ability altogether.

Was it helpful?

Solution

Created a new "Admin" user with administrative privileges and installed XCode successfully through that account.

OTHER TIPS

Solution found and copied from here: https://discussions.apple.com/thread/3863980?start=0&tstart=0

  1. Double click Xcode 4.3.1 dmg file ...
  2. Window will show Xcode app.
  3. Right Cick App
  4. Show Package contents
  5. Then go to /Contents/Resources/Packages/
  6. Install That MobileDevice.pkg ...
  7. After installation double click on Xcode app ...
  8. Just See Xcode is ready ...
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top