MacOS – Unidentifiable error while installing xcode on Lion 10.7

installmacosxcode

So two weeks ago I had purchased the 10.6 xcode from the app store. Today I was updating it after I just got lion (7gb in total downloads in one week for one app.

Through the install, I get a message in the installer:

Error encountered check /var/log/install.log:

I'm not sure what's going on but I'd like to get it fixed.

Ahmed-Dassoukis-MacBook-Pro:djig ahmed old$ cat /var/log/install.log
Jul 24 22:30:08 Ahmed-Dassoukis-MacBook-Pro newsyslog[9508]: logfile turned over due to size>1000K
Jul 24 22:30:34 Ahmed-Dassoukis-MacBook-Pro installd[9474]: PackageKit: Extracting file://localhost/Applications/Install%20Xcode.localized/Install%20Xcode.app/Contents/Resources/Packages/iPhoneSDK3_1_3.pkg (destination=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup/PKInstallSandbox-tmp/Root, uid=0)
Jul 24 22:30:40 Ahmed-Dassoukis-MacBook-Pro installd[9474]: PackageKit: Extracting file://localhost/Applications/Install%20Xcode.localized/Install%20Xcode.app/Contents/Resources/Packages/iPhoneSDK3_1_2.pkg (destination=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup/PKInstallSandbox-tmp/Root, uid=0)
Jul 24 22:30:46 Ahmed-Dassoukis-MacBook-Pro installd[9474]: PackageKit: Extracting file://localhost/Applications/Install%20Xcode.localized/Install%20Xcode.app/Contents/Resources/Packages/iPhoneSDK3_1.pkg (destination=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup/PKInstallSandbox-tmp/Root, uid=0)
Jul 24 22:30:51 Ahmed-Dassoukis-MacBook-Pro installd[9474]: PackageKit: Extracting file://localhost/Applications/Install%20Xcode.localized/Install%20Xcode.app/Contents/Resources/Packages/iPhoneSDK3_0.pkg (destination=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup/PKInstallSandbox-tmp/Root, uid=0)
Jul 24 22:30:55 Ahmed-Dassoukis-MacBook-Pro installd[9474]: PackageKit: Extracting file://localhost/Applications/Install%20Xcode.localized/Install%20Xcode.app/Contents/Resources/Packages/XcodeiPhonePlugins.pkg (destination=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup/PKInstallSandbox-tmp/Root, uid=0)
Jul 24 22:30:59 Ahmed-Dassoukis-MacBook-Pro installd[9474]: PackageKit: Executing script "./preinstall" in /private/tmp/PKInstallSandbox.IPAL84/Scripts/com.apple.pkg.DeveloperToolsLeo.aGdVUx
Jul 24 22:31:00 Ahmed-Dassoukis-MacBook-Pro _securityagent[9518]: Running Install Scripts . . .
Jul 24 22:31:00 Ahmed-Dassoukis-MacBook-Pro _securityagent[9520]: Begin script: AlertAll.sh
Jul 24 22:31:00 Ahmed-Dassoukis-MacBook-Pro installd[9474]: ./preinstall: sudo: unknown user: ahmed
Jul 24 22:31:00 Ahmed-Dassoukis-MacBook-Pro _securityagent[9523]: End script: AlertAll.sh
Jul 24 22:31:00 Ahmed-Dassoukis-MacBook-Pro _securityagent[9524]: Begin script: preflight
Jul 24 22:31:00 Ahmed-Dassoukis-MacBook-Pro _securityagent[9527]: End script: preflight
Jul 24 22:31:00 Ahmed-Dassoukis-MacBook-Pro _securityagent[9528]: Begin script: writelocation
Jul 24 22:31:00 Ahmed-Dassoukis-MacBook-Pro _securityagent[9531]: End script: writelocation
Jul 24 22:31:00 Ahmed-Dassoukis-MacBook-Pro _securityagent[9532]: Begin script: zzzcleanup
Jul 24 22:31:01 Ahmed-Dassoukis-MacBook-Pro _securityagent[9536]: End script: zzzcleanup
Jul 24 22:31:01 Ahmed-Dassoukis-MacBook-Pro _securityagent[9537]: 4 Install Scripts run.
Jul 24 22:31:33 Ahmed-Dassoukis-MacBook-Pro installd[9474]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “DeveloperTools.pkg”." UserInfo=0x7f8b56174d70 {NSFilePath=./preinstall, NSURL=file://localhost/Applications/Install%20Xcode.localized/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.localized/Install%20Xcode.app/Contents/Resources/Packages/DeveloperTools.pkg";
        PKInstallPackageIdentifier = "com.apple.pkg.DeveloperToolsLeo";
    }
Jul 24 22:31:33 Ahmed-Dassoukis-MacBook-Pro installer[9465]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “DeveloperTools.pkg”." UserInfo=0x7ff9d8e61240 {NSFilePath=./preinstall, NSURL=file://localhost/Applications/Install%20Xcode.localized/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”.}
Jul 24 22:31:34 Ahmed-Dassoukis-MacBook-Pro installer[9465]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.

Best Answer

There seem to be an issue with your sudo name:

./preinstall: sudo: unknown user: ahmed

I would suggest:

  1. open a new administrator account (In the System Preferences)
  2. Login with this new account
  3. Try to install XCode with it. (Copy your "Install XCode" package into a common folder like /var/tmp)
  4. If installation successful, go back to your old account and investigate what could potentially be wrong with this account.
  5. If not give us a comment.