在 10.5 上一切正常,但现在我的 PackageMaker 安装项目已损坏。这几天我一直在和一个问题作斗争,要么
- Snow Leopard (OS X 10.6.1) 破坏了 PackageMaker 安装
- 我缺乏非常非常基本的知识花絮
为了缩小问题的范围,我已经到了这一点:
- 创建一个新的 PackageMaker 安装
- 让它在我的主目录中安装一个 jpeg 图像
- 定义一个
preinstall
什么都不做的脚本
#!/bin.sh 出口 0
运行上述...并观察它失败并出现以下错误消息,例如时钟工作
Sep 14 15:09:45 manoa installd[5620]: PackageKit: ----- Begin install -----
Sep 14 15:09:45 manoa installd[5620]: PackageKit: request=PKInstallRequest <1 packages, destination=/>
Sep 14 15:09:45 manoa installd[5620]: PackageKit: packages=(\n "PKLeopardPackage <file://localhost/Users/stu/Desktop/asdf.pkg>"\n)
Sep 14 15:09:46 manoa installd[5620]: PackageKit: Extracting /Users/stu/Desktop/asdf.pkg (destination=/var/folders/Hb/HbXJFyEpFaupt5QyLN-pTk+++TI/-Tmp-/PKInstallSandbox-tmp/Root/~, uid=501)
Sep 14 15:09:46 manoa installd[5620]: PackageKit: Executing script "./preinstall" in /private/tmp/PKInstallSandbox.cmlS2H/Scripts/test.test.5year_header.pkg.PFrHNB
Sep 14 15:09:46 manoa installd[5620]: PackageKit: *** launch path not accessible
Sep 14 15:09:46 manoa installd[5620]: PackageKit: Install Failed: PKG: pre-install scripts for "test.test.5year_header.pkg"\nError Domain=PKInstallErrorDomain Code=112 UserInfo=0x100149430 "An error occurred while running scripts from the package “asdf”." {\n NSFilePath = "./preinstall";\n NSLocalizedDescription = "An error occurred while running scripts from the package \U201casdf\U201d.";\n NSURL = "file://localhost/Users/stu/Desktop/asdf.pkg";\n PKInstallPackageIdentifier = "test.test.5year_header.pkg";\n}
Sep 14 15:09:46 manoa Installer[5614]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 UserInfo=0x1195917c0 "An error occurred while running scripts from the package “asdf”."
Sep 14 15:09:46 manoa Installer[5614]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
Sep 14 15:09:47 manoa Installer[5614]: IFDInstallController 144040 state = 7
Sep 14 15:09:47 manoa Installer[5614]: Displaying 'Install Failed' UI.
Sep 14 15:09:47 manoa Installer[5614]: 'Install Failed' UI displayed message:'The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.'.
中没有文件/private/tmp/PKInstallSandbox.cmlS2H/Scripts/test.test.5year_header.pkg.PFrHNB/
,这让我认为问题出在 PackageMaker 上,而不是我。但我是 OS X 软件安装领域的新手,所以仍然存在疑问。
所以,问题 是:PackageMaker 的预安装脚本在 OS X 10.6 上是否损坏?还是对我不理解的预安装脚本有一些要求?