github.com/kikitux/packer@v0.10.1-0.20160322154024-6237df566f9f/website/source/intro/getting-started/setup.html.md (about)

     1  ---
     2  description: |
     3      Packer must first be installed on the machine you want to run it on. To make
     4      installation easy, Packer is distributed as a binary package for all supported
     5      platforms and architectures. This page will not cover how to compile Packer from
     6      source, as that is covered in the README and is only recommended for advanced
     7      users.
     8  layout: intro
     9  next_title: Build an Image
    10  next_url: '/intro/getting-started/build-image.html'
    11  page_title: Install Packer
    12  prev_url: '/intro/platforms.html'
    13  ...
    14  
    15  # Install Packer
    16  
    17  Packer must first be installed on the machine you want to run it on. To make
    18  installation easy, Packer is distributed as a [binary package](/downloads.html)
    19  for all supported platforms and architectures. This page will not cover how to
    20  compile Packer from source, as that is covered in the
    21  [README](https://github.com/mitchellh/packer/blob/master/README.md) and is only
    22  recommended for advanced users.
    23  
    24  ## Installing Packer
    25  
    26  To install packer, first find the [appropriate package](/downloads.html) for
    27  your system and download it. Packer is packaged as a "zip" file.
    28  
    29  Next, unzip the downloaded package into a directory where Packer will be
    30  installed. On Unix systems, `~/packer` or `/usr/local/packer` is generally good,
    31  depending on whether you want to restrict the install to just your user or
    32  install it system-wide. On Windows systems, you can put it wherever you'd like.
    33  
    34  After unzipping the package, the directory should contain a single binary
    35  program called `packer`. The final step to
    36  installation is to make sure the directory you installed Packer to is on the
    37  PATH. See [this
    38  page](https://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux)
    39  for instructions on setting the PATH on Linux and Mac. [This
    40  page](https://stackoverflow.com/questions/1618280/where-can-i-set-path-to-make-exe-on-windows)
    41  contains instructions for setting the PATH on Windows.
    42  
    43  ## Verifying the Installation
    44  
    45  After installing Packer, verify the installation worked by opening a new command
    46  prompt or console, and checking that `packer` is available:
    47  
    48  ``` {.text}
    49  $ packer
    50  usage: packer [--version] [--help] <command> [<args>]
    51  
    52  Available commands are:
    53      build       build image(s) from template
    54      fix         fixes templates from old versions of packer
    55      inspect     see components of a template
    56      push        push template files to a Packer build service
    57      validate    check that a template is valid
    58      version     Prints the Packer version
    59  ```
    60  
    61  If you get an error that `packer` could not be found, then your PATH environment
    62  variable was not setup properly. Please go back and ensure that your PATH
    63  variable contains the directory which has Packer installed.
    64  
    65  Otherwise, Packer is installed and you're ready to go!
    66  
    67  ## Alternative Installation Methods
    68  
    69  While the binary packages is the only official method of installation, there are
    70  alternatives available.
    71  
    72  ### Homebrew
    73  
    74  If you're using OS X and [Homebrew](http://brew.sh), you can install Packer:
    75  
    76      $ brew install packer
    77  
    78  ## Troubleshooting
    79  
    80  On some RedHat-based Linux distributions there is another tool named `packer`
    81  installed by default. You can check for this using `which -a packer`. If you get
    82  an error like this it indicates there is a name conflict.
    83  
    84      $ packer
    85      /usr/share/cracklib/pw_dict.pwd: Permission denied
    86      /usr/share/cracklib/pw_dict: Permission denied
    87  
    88  To fix this, you can create a symlink to packer that uses a different name like
    89  `packer.io`, or invoke the `packer` binary you want using its absolute path,
    90  e.g. `/usr/local/packer`.