gpt4 book ai didi

macos - Jenkins 1.609 native 包安装程序在 OSX Yosemite 上失败

转载 作者:行者123 更新时间:2023-11-29 08:55:56 28 4
gpt4 key购买 nike

我正在尝试使用 OSX 上的 native 包安装程序安装 Jenkins。安装程序向导失败并显示以下消息:

The Installer encountered an error that caused the installation to fail.

/var/log/install.log 中有很多内容,但我认为这是最相关的:

Apr 19 21:38:10 computername installd[3906]: PackageKit: Executing script "./postinstall" in /private/tmp/PKInstallSandbox.lyWpmk/Scripts/org.jenkins-ci.launchd-jenkins.pkg.dnGIoF
Apr 19 21:38:10 computername installd[3906]: ./postinstall: <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)
Apr 19 21:38:10 computername installd[3906]: ./postinstall: list: Invalid Path
Apr 19 21:38:10 computername installd[3906]: ./postinstall: No jenkins user found, creating jenkins user and group
Apr 19 21:38:10 computername installd[3906]: ./postinstall: ERROR: All system uids are in use!
Apr 19 21:38:10 computername install_monitor[6300]: Re-included: /Applications, /Library, /System, /bin, /private, /sbin, /usr
Apr 19 21:38:10 computername installd[3906]: PackageKit: releasing backupd
Apr 19 21:38:10 computername installd[3906]: PackageKit: allow user idle system sleep
Apr 19 21:38:10 computername installd[3906]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “jenkins-1.609.pkg”." UserInfo=0x7f8ff1c4f5b0 {NSFilePath=./postinstall, NSURL=file://localhost/Users/username/Downloads/jenkins-1.609.pkg#orgjenkinsci-1.pkg, PKInstallPackageIdentifier=org.jenkins-ci.launchd-jenkins.pkg, NSLocalizedDescription=An error occurred while running scripts from the package “jenkins-1.609.pkg”.} {
NSFilePath = "./postinstall";
NSLocalizedDescription = "An error occurred while running scripts from the package \U201cjenkins-1.609.pkg\U201d.";
NSURL = "file://localhost/Users/username/Downloads/jenkins-1.609.pkg#orgjenkinsci-1.pkg";
PKInstallPackageIdentifier = "org.jenkins-ci.launchd-jenkins.pkg";
}

环境:

OSX: 10.10.3
Jenkins: jenkins-1.609.pkg
Java: 1.8.0_31

有什么建议吗?

最佳答案

编辑:虽然下面的解决方案似乎已经帮助人们解决了 native 安装程序的问题,我建议通过使用 homebrew 安装 Jenkins 来完全避免这个问题。当我使用 native 安装程序时,我在尝试配置 Jenkins 时遇到了许多其他令人头疼的问题,但在切换到通过自制软件安装后,它更像是一个即插即用的场景。

原答案:

问题是您的系统上有一个 uid 为 499 的用户。您可以通过运行来查看

$ dscl . -list /Users uid | sort -nrk 2

jenkins 软件包安装程序中有一个安装后脚本,如果 uid 499 正在使用,则假定所有系统 uid 都在使用中。因此,您有两种选择来解决此问题:

  • 修复 jenkins 包安装程序

  • 为 uid 为 499 的用户更改 uid

改变一个用户的uid并不是那么简单,但是看看this .

我更喜欢修复 jenkins 包安装程序。以下是相关指南:

  1. 下载 jenkins 安装程序
  2. 在某处解压安装程序

    $ pkgutil --expand ~/Downloads/jenkins-1.610.pkg ~/Downloads/jenkins-1.610.unpkg

  3. 导航到安装后脚本(这可能会改变,并且软件包中有多个安装后脚本,因此如果下面的路径错误,请查找带有注释行“# Find free uid under 500”的安装后脚本)

    $ cd ~/Downloads/jenkins-1.610.unpkg/orgjenkinsci-1.pkg/Scripts

  4. 打开 postinstall 进行编辑并找到有问题的代码行(这是以 uid= 开头的行,在“# Find free uid under 500”行之后)

  5. 将“=”后的所有内容替换为您希望使用的 uid。

  6. 保存文件

  7. 导航到(仍未打包的)包根目录

    $ cd ~/Downloads/jenkins-1.610.unpkg

  8. 重新打包

    $ pkgutil --flatten ~/Downloads/jenkins-1.610.unpkg ~/Desktop/jenkins-1.610.pkg

  9. 运行固定安装程序(如果您使用本指南,它将位于桌面上)。也许系统会警告你不能从不受信任的来源安装,这可能是因为我们修改了安装程序,或者仅仅是因为你不是从应用商店安装的。无论哪种方式,您都可以进入“系统偏好设置”->“安全和隐私”以启用来自不受信任来源的安装。

关于macos - Jenkins 1.609 native 包安装程序在 OSX Yosemite 上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29735072/

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