osx-snow-leopard - 在 Snow Leopard 上,带有预安装脚本的 PackageMaker 安装是否损坏?

标签 osx-snow-leopard packagemaker

一切都在 10.5 上运行,但现在我的 PackageMaker 安装项目坏了。几天来我一直在与一个问题作斗争,要么

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

  • 为了缩小问题的范围,我已经到了这一点:
  • 创建新的 PackageMaker 安装
  • 让它在我的主目录中安装一个 jpeg 图像
  • 定义一个 preinstall什么都不做的脚本
  •     #!/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.'.
    
    /private/tmp/PKInstallSandbox.cmlS2H/Scripts/test.test.5year_header.pkg.PFrHNB/中没有文件,这让我觉得问题出在 PackageMaker 上,而不是我。但我是 OS X 软件安装领域的新手,所以仍有疑问。

    所以,问题:带有预安装脚本的 PackageMaker 是否已损坏 在 OS X 10.6 上?或 是否有一些关于预安装脚本的要求 我不明白?

    最佳答案

    我遇到了同样的问题,为脚本设置可执行权限为我解决了这个问题!

    pkgutil --expand my.pkg my 
    chmod +x my/inner.pkg/Scripts/preinstall 
    pkgutil --flatten my my-fixed.pkg 
    

    this thread at golang-nuts groups 中找到此解决方案

    关于osx-snow-leopard - 在 Snow Leopard 上,带有预安装脚本的 PackageMaker 安装是否损坏?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1421483/

    相关文章:

    macos - 有没有办法通过 Applescript Hook OSX sleep /唤醒事件?

    ruby-on-rails - Mac Ports 使用 gem 'pg"卸载噩梦

    MySQL - 在 Snow Leopard 上安装失败

    xcode - PackageMaker 错误无法将资源复制到 en.lproj

    objective-c - 自定义 Mac 安装程序覆盖/库/应用程序支持文件

    macos - 基本汇编程序上的 "Illegal instruction"- 甚至不是 hello world - 为什么需要链接?

    升级到 Snow Leopard 后的 MySQL gem 问题

    macos - 在 Mac OS X 上查找 .app/使用 XCode 4.3 运行 PackageMaker 的正确方法

    macos - 将 PackageMaker 命令行构建安装程序移植到 pkgbuild

    ios - DMG 安装程序可以支持脚本吗?