使用预安装脚本进行的 PackageMaker 安装在 Snow Leopard 上是否会损坏?
在 10.5 上一切正常,但现在我的 PackageMaker 安装项目被破坏了。我已经和这个问题斗争了几天了,
- 雪豹(OS X 10.6.1)已经破坏了PackageMaker的安装
- 我缺乏非常非常基本的知识
为了缩小问题范围,我必须 )
- 创建一个新的 PackageMaker 安装
- 将 jpeg 图像安装到我的主目录中
- 定义一个不执行任何操作的
preinstall
脚本
#!/bin.sh exit 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 上是否损坏了?或者是否有一些关于预安装脚本的要求我不明白?
Everything worked on 10.5, but now my PackageMaker installation project is broken. I've been fighting a problem for a few days now, and either
- Snow Leopard (OS X 10.6.1) has broken PackageMaker installations
- I am lacking a very, very basic tidbit of knowledge
To narrow down the problem, I've gotten to this point:
- Create a new PackageMaker installation
- Have it install a jpeg image into my home directoy
- Define a
preinstall
script that does nothing
#!/bin.sh exit 0
Run the above...and watch it fail with the below error message like clock work
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.'.
There is no file in /private/tmp/PKInstallSandbox.cmlS2H/Scripts/test.test.5year_header.pkg.PFrHNB/
, which makes me think the problem is with PackageMaker, and not me. But I'm new to the world of OS X software installation, so doubts remain.
So, the question: Is PackageMaker with a preinstall script broken on OS X 10.6? Or is there some requirement regarding preinstall scripts that I do not understand?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我遇到了同样的问题,设置脚本的可执行权限为我解决了这个问题!
在golang-nuts 群组的此帖子中找到了此解决方案
I had the same problem and setting the executable permissions for the scripts solved it for me!
Found this solution in this thread at golang-nuts groups
“启动路径无法访问”很可能与压缩和/或解压缩 PKG 的软件有关。
因此,我遇到的问题是我的 postflight 脚本未运行并导致我的 PKG 失败。查看安装程序日志(要查看此运行有问题的 PKG,然后菜单项“窗口 > 安装程序日志”并从下拉列表中选择“显示所有日志”),我在尝试时看到了可怕的“启动路径无法访问”运行脚本(由 PackageMaker 重命名为“postflight”)。
该问题仅出现在我客户的系统上。这真是令人困惑,因为我的两台 Mac 测试机器在运行 PKG 时都没有问题,而且它们的环境似乎与客户的机器相同。
然后,在赛门铁克网站上的一篇不起眼的帖子中,我看到有人发现这个问题与 PKG 的压缩和/或解压缩方式有关。
果然。我的客户正在从 DropBox 下载 PKG,而 DropBox 压缩它的方式损坏了 PKG 内的某些内容。
解决方案是我在上传到 DropBox 之前将 PKG 压缩到我的系统上,然后一切顺利。
"launch path not accessible" may very well have to do with which software is zipping and/or unzipping the PKG.
So, I was having the problem that my postflight script was not running and was causing my PKG to fail. Looking at the installer log (to see this run the PKG in question, then menu item 'Window > Installer Log' and select 'Show All Logs' from drop down) I saw the dreaded 'launch path not accessible' when it was trying to run script (renamed by PackageMaker to 'postflight').
The problem was only showing up on my customer's systems. It was a real stumper as both of my Mac test machines had no problem running the PKG and their environments appeared to be the same as the customer's machines.
Then in an obscure post on a Symantec website I saw that someone discovered that this problem has something to do with how the PKG is being zipped and/or unzipped.
Sure enough. My customer was downloading the PKG from DropBox and the way that DropBox was zipping it corrupted something inside the PKG.
The solution was for me to ZIP the PKG on my system before uploading to DropBox and then everything worked swimmingly.
我也有同样的问题。检查脚本的第一行。就我而言,缺少
!
来自
#!/bin/sh
I had the same problem. Check the first line of your script. In my case the
!
was missingfrom the
#!/bin/sh