是否在Snow Leopard上安装了预安装脚本的PackageMaker安装?

Stu*_*son 8 packagemaker osx-snow-leopard

一切都在10.5上工作,但现在我的PackageMaker安装项目已经破产.我已经和他人争吵了好几天了

  • Snow Leopard(OS X 10.6.1)已破坏PackageMaker安装
  • 我缺乏非常非常基本的知识

为了缩小问题范围,我已经达到了这一点:

  1. 创建一个新的PackageMaker安装
  2. 它有一个jpeg图像到我的家庭directoy
  3. 定义一个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.'.
Run Code Online (Sandbox Code Playgroud)

没有文件/private/tmp/PKInstallSandbox.cmlS2H/Scripts/test.test.5year_header.pkg.PFrHNB/,这让我觉得问题出在PackageMaker上,而不是我.但我是OS X软件安装世界的新手,所以仍然存在疑虑.

所以,问题: PackageMaker是否在OS X 10.6上打破了预安装脚本?或者是否有一些关于我不理解的预安装脚本的要求

yai*_*chu 5

我有同样的问题,并为脚本设置可执行权限解决了它!

pkgutil --expand my.pkg my 
chmod +x my/inner.pkg/Scripts/preinstall 
pkgutil --flatten my my-fixed.pkg 
Run Code Online (Sandbox Code Playgroud)

在golang-nuts群体的这个主题中找到了这个解决方案

  • 我发现将执行权限添加到原始文件本身(在构建安装程序文件之前)也有效。这样,您就不必篡改 pkg 文件。 (2认同)

Gab*_*acs 0

我有同样的问题。检查脚本的第一行。就我而言!#!/bin/sh