MacOS – Cannot install hiera by brew

homebrewinstallmacos

I am on macOS High Sierra

The first command (http://macappstore.org/hiera/)

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

looks OK

The 2nd command results in the error:

brew install caskroom/cask/brew-cask

However, as I understand it is not needed now.

The 3rd command results in the error:

brew cask install hiera
==> Satisfying dependencies
==> Downloading https://downloads.puppetlabs.com/mac/hiera-1.3.4.dmg
Already downloaded: /Users/anarinsky/Library/Caches/Homebrew/Cask/hiera--1.3.4.dmg
==> Verifying checksum for Cask hiera
==> Installing Cask hiera
==> Running installer for hiera; your password may be necessary.
==> Package installers may write to any location; options such as -- 
appdir are ignored.
Password: 
==> installer: Package name is hiera-1.3.4
==> installer: Installing at base path /
==> installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
==> Purging files for version 1.3.4 of Cask hiera
Error: Command failed to execute!
==> Failed command:
/usr/bin/sudo -E -- /usr/sbin/installer -pkg 
/usr/local/Caskroom/hiera/1.3.4/hiera-1.3.4.pkg -target /

==> Standard Output of failed command:
installer: Package name is hiera-1.3.4
installer: Installing at base path /
installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
==> Standard Error of failed command:
==> Exit status of failed command:
#<Process::Status: pid 10228 exit 1>

I suspect that installing at the base path / does not work.

Best Answer

Short answer

Please try brew cask install puppet-agent. Hiera is included.

More details

I tried installing the https://downloads.puppetlabs.com/mac/hiera-1.3.4.dmg file that the cask recipe install manually and got the following warning:

This package is incompatible with this version of OS X and may fail to >install.

Installing this package may damage your system, and the installation may >fail. To stop the program and the installation, click “Cancel >Installation”.

I did some googling and found that 1.3.4 is very old.

from: https://tickets.puppetlabs.com/browse/HI-533

Hiera 1.3.4 is old (> 2 years). Much older than OSx 10.11.6. There are >later releases of hiera,"

from: https://docs.puppet.com/hiera/3.1/

To get started with Hiera, you’ll need to do all of the following:

Make sure it’s installed. Hiera ships with Puppet agent, so install the >puppet-agent package if you haven’t already. (Linux, Windows, OS X.)