已經和這個小時戰鬥了。我已經從App Store下載了最新的安裝程序,希望能夠在將設備更新到5.1後再次在設備上運行我的代碼。沒那麼快!我收到一個神祕的錯誤,說安裝失敗。這就好像它告訴我「你的安裝因失敗而失敗」。謝謝,上尉明顯。安裝Xcode 4.3.1失敗(OSX 10.7.3)
展望/var/log/install.log我認爲這(最後幾行的片斷失效前):
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.
我完全相信我的用戶名是在sudoers名單上。還有什麼我可以錯過?我嘗試在新的重新啓動後安裝它,但沒有運行,但安裝程序。
PS:我還沒有嘗試刪除以前安裝的Xcode。我永遠不會記得這是必要的,我寧願繼續在模擬器上開發,而不是完全喪失這種能力。
我最近安裝了XCode 4.3,它安裝乾淨。我有OSX獅子10.7.2。如果您有以前安裝的Xcode版本,則沒有什麼不同。我正在運行Xcode 4.1,4.2和4.3。可能是下載文件中的錯誤。 – 2012-03-12 04:36:26
創建一個具有管理權限的新「Admin」用戶,並通過該帳戶成功安裝XCode。多麼糟糕的辦法讓事情能夠奏效......我用Windoze安裝程序運氣更好。 顯然,我無法自己回答這個問題,持續5個小時。但現在已經解決了。 – 2012-03-12 07:21:09