Jenkins 1.609 Embedded Package Installer not working on OSX Yosemite

I am trying to install Jenkins using the built-in package installer on OSX. The installation wizard does not work with the following message:

The installer detected an error that caused the installation to fail.

There are a few bits in /var/log/install.log , but I think this is most relevant:

 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"; } 

Environment:

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

Any suggestions?

+6
source share
1 answer

Change Although the solution seems to have helped people overcome the problem with their own installer, I would recommend avoiding the problem altogether with the home-grown Jenkins installation . >. Back when I used my own installer, I had many other headaches when trying to set up Jenkins, but after going through the installation through homebrew it is a lot more plug and play script.

Original answer:

The problem is that you have a user on your system with uid 499. This can be seen by running

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

There is a postinstall script in the jenkins package installer that assumes that all system uids are used if uid 499 is used. Therefore, you have two options to fix this:

  • Fix jenkins package installer

or

  • Change uid for user with uid 499

Changing the user uid is not so simple, but look at this .

I prefer to fix the jenkins package installer. The following is a guide for this:

  • Download the jenkins installer
  • Unzip the installer somewhere

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

  • Go to the postinstall script (this may change, and there are several postinstall scripts in the package, so if the path below is incorrect, find the postinstall script with the commented line '# Find free uid up to 500')

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

  • Open postinstall for editing and find the line with the code violation (this is the line starting with uid =, after the line "# Find free uid up to 500")

  • Replace everything after "=" with the uid you want to use.

  • Save file

  • Go to the root directory (still unpacked)

    $ cd ~ / Downloads / jenkins-1.610.unpkg

  • Discard the package

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

  • Run the fixed installer (which will be on the desktop if you used this guide). Perhaps the system will warn you that you cannot install from untrusted sources, which may be due to the fact that we modified the installer or simply because you are not installing from the application store. In any case, you can go to System Preferences → Security and Privacy to enable settings from untrusted sources.

+14
source

Source: https://habr.com/ru/post/985470/


All Articles