Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

[lion] XCode 4.1 doesn't install with lion

hi


first, sorry for my english...


I had an Imac 2010 with a hard drive 1.5 To who had 1 To free


1) i make upgrade snow leopard to lion

2) Xcode was installed for SL before i made upgrade

3) from appstore, i download XCode 4.1

4) few seconds after install begin, i received this message :


"The installer encountered an error that caused the installation to fail. Please consult /var/log/install.log for more details"


5) i decided to install lion from an usb key


6) i download for the second time XCode 4.1 but i received the same message


Could you help me please


if i open terminal and tape this "nano /var/log/install.log" i obtain this

Jul 22 00:44:27 new-host-3 Install Mac OS X Lion[355]: @(#)PROGRAM:Install PROJECT:Install-684
Jul 22 00:44:27 new-host-3 Install Mac OS X Lion[355]: @(#)PROGRAM:IA PROJECT:InstallAssistant-197
Jul 22 00:44:27 new-host-3 Install Mac OS X Lion[355]: Hardware: iMac11,3 @ 2.93 GHz (x 8), 8192 MB RAM
Jul 22 00:44:27 new-host-3 Install Mac OS X Lion[355]: Running OS Build: Mac OS X 10.7 (11A511)
Jul 22 00:44:27 new-host-3 Install Mac OS X Lion[355]: Env: PATH=/usr/bin:/bin:/usr/sbin:/sbin
Jul 22 00:44:27 new-host-3 Install Mac OS X Lion[355]: Env: PWD=/
Jul 22 00:44:27 new-host-3 Install Mac OS X Lion[355]: Env: SHLVL=1
Jul 22 00:44:27 new-host-3 Install Mac OS X Lion[355]: Env: __OSINSTALL_ENVIRONMENT=1
Jul 22 00:44:27 new-host-3 Install Mac OS X Lion[355]: Env: CI_DEFAULT_OPENCL_USAGE=0
Jul 22 00:44:27 new-host-3 Install Mac OS X Lion[355]: Env: OS_INSTALL=1
Jul 22 00:44:27 new-host-3 Install Mac OS X Lion[355]: Env: _=/System/Installation/CDIS/LCA.app/Contents/MacOS/LCA
Jul 22 00:44:27 new-host-3 Install Mac OS X Lion[355]: Using distribution archive from /Volumes/Image Volume/Packages/OSInstall.mpkg
Jul 22 00:44:28 new-host-3 Install Mac OS X Lion[355]: Using product <OSInstallDVDProduct> based on media at /Volumes/Image Volume at distance 10
Jul 22 00:44:28 new-host-3 Install Mac OS X Lion[355]: Using product <OSInstallESDProduct> based on distribution at /Volumes/Image Volume/Packages/OSInstall.mpkg at distance 5
Jul 22 00:44:28 new-host-3 Install Mac OS X Lion[355]: Checking Software Update catalog URL http://swscan.apple.com/content/catalogs/others/index-lion-snowleopard-leopard.m erged-1.suc$
Jul 22 00:44:28 new-host-3 diskmanagementd[343]: DM ->T+[DMToolBootPreference getPartitionBootability:]: inUDS=0x10674dc30=disk0s2=Macintosh HD
Jul 22 00:44:28 new-host-3 diskmanagementd[343]: DM ..T+[DMToolBootPreference getPartitionBootability:]: PMBootable=1 (bootable right now without any further action)
Jul 22 00:44:28 new-host-3 diskmanagementd[343]: DM ..T+[DMToolBootPreference getPartitionBootability:]: PMBootCapable=0 (bootable if you call MKCFPrepareBootDevice)
Jul 22 00:44:28 new-host-3 diskmanagementd[343]: DM ..T+[DMToolBootPreference getPartitionBootability:]: PMBootSurgeryRequired=0 (for primitive MBR on BIOS, add boot block and loader)
Jul 22 00:44:28 new-host-3 diskmanagementd[343]: DM ..T+[DMToolBootPreference getPartitionBootability:]: PMFSSurgeryRequired=0 (for primitive MBR on BIOS, add boot block and loader)
Jul 22 00:44:28 new-host-3 diskmanagementd[343]: DM ..T+[DMToolBootPreference getPartitionBootability:]: PMNewfsRequired=0 (bootable with MKCFPrep but it will rudely carve)
Jul 22 00:44:28 new-host-3 diskmanagementd[343]: DM <-T+[DMToolBootPreference getPartitionBootability:]: MKerr=0 out=4=0x4
Jul 22 00:44:28 new-host-3 Install Mac OS X Lion[355]: No available package ref for compatibility update. Ignoring.
Jul 22 00:44:41 new-host-3 Install Mac OS X Lion[355]: Created IATool object:8c3a140
Jul 22 00:44:42 new-host-3 Install Mac OS X Lion[355]: No available package ref for compatibility update. Ignoring.
Jul 22 00:44:42 new-host-3 Install Mac OS X Lion[355]: Preventing machine sleep.
Jul 22 00:44:42 new-host-3 Install Mac OS X Lion[355]: Using product IA_PKSecureNetEnabledProduct <file://localhost/Volumes/Macintosh%20HD/Mac%20OS%20X%20Install%20Data/> at distance 5
Jul 22 00:44:42 new-host-3 Install Mac OS X Lion[355]: Using mutable product path: /Volumes/Macintosh HD/Mac OS X Install Data
Jul 22 00:44:44 new-host-3 Install Mac OS X Lion[355]: Using product <OSSoftwareUpdateCatalogProduct> from product keys 11A511_ServerEssentials at distance 25
Jul 22 00:44:45 new-host-3 Install Mac OS X Lion[355]: Retrieving 50 packages (3.716 GB)
Jul 22 00:44:45 new-host-3 Install Mac OS X Lion[355]: Retrieved package com.apple.MacOSX.lang.da (file://localhost/Volumes/Image%20Volume/Packages/Danish.pkg)
Jul 22 00:44:46 new-host-3 Install Mac OS X Lion[355]: Retrieved package com.apple.MacOSX.lang.pl (file://localhost/Volumes/Image%20Volume/Packages/Polish.pkg)
Jul 22 00:44:49 new-host-3 Install Mac OS X Lion[355]: Retrieved package com.apple.pkg.MediaFiles (file://localhost/Volumes/Image%20Volume/Packages/MediaFiles.pkg)
Jul 22 00:44:49 new-host-3 Install Mac OS X Lion[355]: Retrieved package com.apple.pkg.AddressBook (file://localhost/Volumes/Image%20Volume/Packages/AddressBook.pkg)
Jul 22 00:44:50 new-host-3 Install Mac OS X Lion[355]: Retrieved package com.apple.MacOSX.lang.de (file://localhost/Volumes/Image%20Volume/Packages/German.pkg)
Jul 22 00:44:50 new-host-3 Install Mac OS X Lion[355]: Retrieved package com.apple.MacOSX.lang.sv (file://localhost/Volumes/Image%20Volume/Packages/Swedish.pkg)

iMac, Mac OS X (10.6.8)

Posted on Jul 22, 2011 9:47 AM

Reply
Question marked as Best reply

Posted on Jul 22, 2011 9:49 AM

Did you try to force quit iTunesHelper ? I know that it interfers with the installation of XCode 4.1

97 replies

Sep 1, 2011 8:57 AM in response to jimweast

Still not there for me ...

I've tried every hack, sudoers, sudo, killing itunes, etc ...


Any idea ? Pulling my hairs out.


Here's my log


mac:Applications cem$ tail -f /var/log/install.log

Sep 1 17:55:01 mac installd[375]: PackageKit: Extracting file://localhost/Applications/Install%20Xcode.app/Contents/Resources/Packages/O penGLApps.pkg (destination=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup/PKInstallSandbox-tmp/Root, uid=0)

Sep 1 17:55:02 mac installd[375]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=110 "An error occurred while extracting files from the package “DevToolsDocumentation.pkg”." UserInfo=0x7fb7e6701a30 {NSLocalizedDescription=An error occurred while extracting files from the package “DevToolsDocumentation.pkg”., NSFilePath=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup/PKInstallSandbox-tmp/Root, NSURL=file://localhost/Applications/Install%20Xcode.app/Contents/Resources/Pack ages/DevToolsDocumentation.pkg, PKInstallPackageIdentifier=com.apple.pkg.DevToolsDocumentationLeo, NSUnderlyingError=0x7fb7e68ecfd0 "The file couldn’t be opened because it isn’t in the correct format."} {

NSFilePath = "/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup/PKInstallSandbox-tmp/Root";

NSLocalizedDescription = "An error occurred while extracting files from the package \U201cDevToolsDocumentation.pkg\U201d.";

NSURL = "file://localhost/Applications/Install%20Xcode.app/Contents/Resources/Packages/ DevToolsDocumentation.pkg";

NSUnderlyingError = "Error Domain=NSCocoaErrorDomain Code=259 \"The file couldn\U2019t be opened because it isn\U2019t in the correct format.\"";

PKInstallPackageIdentifier = "com.apple.pkg.DevToolsDocumentationLeo";

}

Sep 1 17:55:02 mac installer[1121]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=110 "An error occurred while extracting files from the package “DevToolsDocumentation.pkg”." UserInfo=0x7f8b01661b90 {NSUnderlyingError=0x7f8b01661c20 "The file couldn’t be opened because it isn’t in the correct format.", NSFilePath=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup/PKInstallSandbox-tmp/Root, NSURL=file://localhost/Applications/Install%20Xcode.app/Contents/Resources/Pack ages/DevToolsDocumentation.pkg, PKInstallPackageIdentifier=com.apple.pkg.DevToolsDocumentationLeo, NSLocalizedDescription=An error occurred while extracting files from the package “DevToolsDocumentation.pkg”.}

Sep 1 17:55:03 mac installer[1121]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.

Sep 1, 2011 9:10 AM in response to discofever

Ok ran the permission fixer from diskutility now i come to this error :


Sep 1 18:04:37 mac installer[1163]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=110 "An error occurred while extracting files from the package “DeveloperDiskImageReleased.pkg”." UserInfo=0x7fe4e5167200 {NSUnderlyingError=0x7fe4e5167140 "The operation couldn’t be completed. cpio read error: Undefined error: 0", NSFilePath=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup/PKInstallSandbox-tmp/Root, NSURL=file://localhost/Applications/Install%20Xcode.app/Contents/Resources/Pack ages/DeveloperDiskImageReleased.pkg, PKInstallPackageIdentifier=com.apple.pkg.DeveloperDiskImageReleased, NSLocalizedDescription=An error occurred while extracting files from the package “DeveloperDiskImageReleased.pkg”.}


something like DeveloperDiskImageReleased.pkg ?!

Sep 5, 2011 12:59 PM in response to jimweast

I GOT IT!!!!! It is very simply actually. download xcode from the app store. make sure all of itunes is closed. NOW the important part. DO NOT I REPEAT DO NOT OPEN Install Xcode from Launchpad. Go to finder, application and open Install Xcode from the application folder. I used to install it from launchpad and it always stoped halfway saying var/log/install.log. But if opened from applications folder it works!!!!

Sep 15, 2011 11:19 PM in response to jimweast

I've had trouble with this issue but it is now resolved.... thanks to a few posters here including markpb91.


I removed old Xcode via terminal, then restartedt the device. I then logged in under a new account admin name. I then used the 'sudo open' command in terminal as described in the post above.


After a week of trying this is the only thing that has worked.

Oct 15, 2011 12:37 PM in response to jimweast

I'm having the same problem trying to install XCode 4.2. My configuration is:


* MBP running 10.7.2

* Installing from an Administrator account

* 220GB free disk space


I suspect there's a permissions problem with the root account. If I look at the Installer error log I see this:


./preinstall: root is not allowed to run sudo on bruce-joness-macbook-pro.



And of course a few lines later:


Oct 15 12:23:04 bruce-joness-macbook-pro installd[325]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “DeveloperTools.pkg”." UserInfo=0x7f8549b6e410 {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";

          }

Oct 15 12:23:04 bruce-joness-macbook-pro installer[314]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “DeveloperTools.pkg”." UserInfo=0x7f81acd03770 {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”.}

Oct 15 12:23:05 bruce-joness-macbook-pro installer[314]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.



I've added this line to my /etc/sudoers (it was empty)

root

All = (ALL) ALL


and still no loving. I tried the "sudo open" trick listed above, thinking that looked promising, but still no love.


I don't have any iTunes processes running.


I REALLY don't want to have to wipe this computer, reinstall everying and restore all of my stuff. Anyone else have any other ideas?

Oct 22, 2011 3:49 PM in response to sepsep96

I found the opposite - I was looking for xcode installer and in was in launchpad- tried loading normal max os x installer and complained it could not install because xcode-installer was already installed - tried removing all of old xcode files using


sudo /Developer/Library/uninstall-devtools –mode=all


http://pushkararora.com/how-to/how-to-uninstall-xcode-completely/


Still didn't work - solution - launch launchpad and after inatalling xcode_4.1_for_lion.dmg


Select Install Xcode - seems to be working


Unfortunately there do not seem to be any installation notes with this file?

Nov 27, 2011 1:43 AM in response to jimweast

Xcode 4.1 Installer from AppStore indeed is corrupt or contains a bad pkg.

The problem (i now believe) is that during the botched installation,

the /etc/sudoer file is altered and corrupted, making it impossible to issue the "sudo" command at the terminal.


I'm now trying to find an original default /etc/sudoer file to compare mine to.

I can confirm a clean Lion system before installation of Xcode 4.1, and now SUDO is dead.


Error: Permission Denied. I have to login as Root user to do things I could before as SuperUser in Terminal.

Nov 28, 2011 6:54 PM in response to baltwo

that's the one that caused the problem.

i don't want to reinstall the whole OS because Xcode 4.2.1 screwed up a permissions file somewhere.


It is logical that installing Xcode makes changes to the Users/Admin mgmt for the purposes of creating system level resources during application development. This may include creating a root level Xcode user within the OS, perhaps somewhere in /etc or /sbin.


Perhaps the problem with the install file of Xcode botches that file which makes reading sudo and granting temporary root level access impossible.

[lion] XCode 4.1 doesn't install with lion

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.