安装Xcode 4.3.1失败(OSX 10.7.3)

时间:2012-03-12 04:22:08

标签: xcode osx-lion failed-installation

与此斗争了好几个小时。我已经从App Store下载了最新的安装程序,希望能够在将其更新到5.1后再次在设备上运行我的代码。没那么快!我得到一个神秘的错误,说安装失败了。这几乎就好像它告诉我“你的安装因为失败而失败”。谢谢,船长Obvious。

调查/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。我永远不会记得那是必要的,而且我宁愿继续在模拟器上开发而不是完全丧失这种能力。

2 个答案:

答案 0 :(得分:0)

创建了一个具有管理权限的新“管理员”用户,并通过该帐户成功安装了XCode。

答案 1 :(得分:0)

从此处找到并复制了解决方案:https://discussions.apple.com/thread/3863980?start=0&tstart=0

  1. 双击Xcode 4.3.1 dmg文件...
  2. 窗口将显示Xcode应用程序。
  3. Right Cick App
  4. 显示包裹内容
  5. 然后转到/ Contents / Resources / Packages /
  6. 安装那个MobileDevice.pkg ......
  7. 安装后双击Xcode app ...
  8. 看看Xcode准备好了......