跳到正文

Download and Install ​

This page contains detailed instructions for installing Pulumi on your machine. For links to detailed release notes, see the Available Versions page.

Installing Pulumi ​

macOS Sierra (10.12) or later is required.

Homebrew ​

You can install Pulumi through the Homebrew package manager:

bash
$ brew install pulumi

This will install the pulumi CLI to the usual place (often /usr/local/bin/pulumi) and add it to your path.

Subsequent updates can be installed in the usual way:

bash
$ brew upgrade pulumi

MacPorts ​

You can install Pulumi through the MacPorts package manager:

bash
$ sudo port install pulumi

This will install the pulumi CLI to /opt/local/bin/pulumi and add it to your path.

Subsequent updates can be installed through the upgrade outdated command:

bash
$ sudo port upgrade outdated

Installation Script ​

Alternatively, you can run our installation script.

bash
$ curl -fsSL https://get.pulumi.com | sh

This will install the pulumi CLI to ~/.pulumi/bin and add it to your path. When it can't automatically add pulumi to your path, you will be prompted to add it manually. See How to permanently set $PATH on Unix for guidance.

The installer script can be rerun to subsequently install new updates.

Manual Installation ​

If you do not wish to use the previous options, you can install Pulumi manually.

  1. Download Pulumi 2.23.1 for macOS. For prior versions and release notes, see the Available Versions page.
  1. Extract the tarball and move the binaries in the pulumi directory to a directory included in your system's $PATH.

Verifying your Installation ​

After installing Pulumi, verify everything is in working order by running the pulumi CLI:

bash
$ pulumi version
v2.23.1

Pulumi Not Found Error ​

If you get an error that pulumi could not be found, it means your path has not been configured correctly. Verify that your system's $PATH contains the directory containing the pulumi CLI installed earlier.

New Version Warning ​

If a new version of Pulumi is available, the CLI produces the following example warning when running any of the available commands:

warning: A new version of Pulumi is available. To upgrade from version '0.17.26' to '2.23.1', run
   $ curl -sSL https://get.pulumi.com | sh

or visit https://pulumi.com/docs/reference/install/ for manual instructions and release notes.

Upgrading Pulumi ​

If you are upgrading to Pulumi 3.0, please see our migration guide.

Installing Betas and Previous Versions ​

You can find the list of versions on the Available Versions page.

Installation Script ​

bash
$ curl -fsSL https://get.pulumi.com | sh -s -- --version <version>

Uninstalling Pulumi ​

To uninstall Pulumi, remove the .pulumi folder from your home directory. If you installed Pulumi manually, you should also remove the pulumi folder that was created.

文档内容翻译自 Pulumi 官方文档。