gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 07:24:06 27 4
gpt4 key购买 nike

一切都在 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/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com