2012-03-12 129 views
1

已經和這個小時戰鬥了。我已經從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。我永遠不會記得這是必要的,我寧願繼續在模擬器上開發,而不是完全喪失這種能力。

+0

我最近安裝了XCode 4.3,它安裝乾淨。我有OSX獅子10.7.2。如果您有以前安裝的Xcode版本,則沒有什麼不同。我正在運行Xcode 4.1,4.2和4.3。可能是下載文件中的錯誤。 – 2012-03-12 04:36:26

+0

創建一個具有管理權限的新「Admin」用戶,並通過該帳戶成功安裝XCode。多麼糟糕的辦法讓事情能夠奏效......我用Windoze安裝程序運氣更好。 顯然,我無法自己回答這個問題,持續5個小時。但現在已經解決了。 – 2012-03-12 07:21:09

回答

0

創建一個具有管理權限的新「Admin」用戶,並通過該帳戶成功安裝XCode。發現從這裏複製

+0

不適合我???我已經更新了我的操作系統到10.7.3,並創建了一個具有管理員名稱的用戶,並給予了管理員權限,但同時也...安裝失敗錯誤出現,並且相同的日誌即將到來...您是否可以有其他替代方法 – DShah 2012-04-18 12:54:31

0

解決方案:https://discussions.apple.com/thread/3863980?start=0&tstart=0

  1. 雙擊的Xcode 4.3.1 dmg文件...
  2. 窗口將顯示Xcode的應用程序。
  3. 右依序按應用
  4. 顯示包內容
  5. 然後去/內容/資源/封裝/
  6. 安裝MobileDevice.pkg ...
  7. 後在Xcode的應用程序安裝,雙擊...
  8. Just See Xcode is ready ...