https://pulumi.com logo
#getting-started
Title
# getting-started
l

little-iron-62790

11/30/2023, 7:13 PM
Hi everyone, I am new to Pulumi. I tried to install on an Ubuntu 20.04.6 LTS with the command line from the documentation but it did not work, so I installed it manually after having downloaded the binary and I have the following strange effect: gl-540@GL-540:~/development/SDV$ pulumi version v3.94.2 gl-540@GL-540:~/development/SDV$ type pulumi pulumi is hashed (/home/gl-540/*.pulumi/bin/pulumi/pulumi*) gl-540@GL-540:~/development/SDV$ pulumi preview Previewing update (dev) View in Browser (Ctrl+O): https://app.pulumi.com/2BlackCoffees/SDV/dev/previews/607b6ab9-30e7-48c5-890e-bd417ea8d459 Type Name Plan Info pulumipulumiStack SDV-dev 1 error; 14 messages Diagnostics: pulumipulumiStack (SDV-dev):
Copy code
/home/gl-540/development/SDV/node_modules/@pulumi/pulumi/runtime/state.js:42
    exports.asyncLocalStorage = new async_hooks_1.AsyncLocalStorage();
                                ^
    TypeError: async_hooks_1.AsyncLocalStorage is not a constructor
        at Object.<anonymous> (/home/gl-540/development/SDV/node_modules/@pulumi/pulumi/runtime/state.js:42:29)
        at Module._compile (internal/modules/cjs/loader.js:778:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
        at Module.load (internal/modules/cjs/loader.js:653:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
        at Function.Module._load (internal/modules/cjs/loader.js:585:3)
        at Module.require (internal/modules/cjs/loader.js:692:17)
        at require (internal/modules/cjs/helpers.js:25:18)
        at Object.<anonymous> (/home/gl-540/development/SDV/node_modules/@pulumi/pulumi/runtime/debuggable.js:24:28)
        at Module._compile (internal/modules/cjs/loader.js:778:30)

    error: an unhandled error occurred: Program exited with non-zero exit code: 1
gl-540@GL-540:~/development/SDV$ lsb_release -a
Copy code
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.6 LTS
Release:	20.04
Codename:	focal
My index.ts is:
Copy code
import * as pulumi from "@pulumi/pulumi";

import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";

// Create an AWS resource (S3 Bucket)
const bucket = new aws.s3.Bucket("my-bucket");

// Export the name of the bucket
export const bucketName = bucket.id;
ADDITIONAL NOTE: The way I installed it:
Copy code
VERSION=3.94.2
wget <https://get.pulumi.com/releases/sdk/pulumi-v${VERSION}-linux-x64.tar.gz> # <https://get.pulumi.com/releases/sdk/pulumi-v3.22.1-linux-x64.tar.gz>
tar \
  --extract \
  --file pulumi-v${VERSION}-linux-x64.tar.gz \
  --gzip
rm -rf $HOME/.pulumi/bin/pulumi
mv pulumi $HOME/.pulumi/bin
FYI, trying to install it from the command line from the documentation led to the following problem: gl-540@GL-540:~/development/SDV/tmp$ curl -fsSL https://get.pulumi.com > install.sh gl-540@GL-540:~/development/SDV/tmp$ sh -x install.sh
Copy code
+ set -e
+ RESET=\033[0m
+ RED=\033[31;1m
+ GREEN=\033[32;1m
+ YELLOW=\033[33;1m
+ BLUE=\033[34;1m
+ WHITE=\033[37;1m
+ trap at_exit EXIT
+ VERSION=
+ SILENT=
+ [ 0 -gt 0 ]
+ [ -z  ]
+ curl --retry 3 --fail --silent -L <https://www.pulumi.com/latest-version>
+ VERSION=3.94.2
+ OS=
+ uname
+ OS=linux
+ ARCH=
+ uname -m
+ ARCH=x64
+ TARBALL_URL=<https://github.com/pulumi/pulumi/releases/download/v3.94.2/>
+ TARBALL_URL_FALLBACK=<https://get.pulumi.com/releases/sdk/>
+ TARBALL_PATH=pulumi-v3.94.2-linux-x64.tar.gz
+ command -v pulumi
+ say_blue === Installing Pulumi v3.94.2 ===
+ [ -z  ]
+ printf %b%s%b\n \033[34;1m === Installing Pulumi v3.94.2 === \033[0m
=== Installing Pulumi v3.94.2 ===
+ return 0
+ mktemp -t pulumi.tar.gz.XXXXXXXXXX
+ TARBALL_DEST=/tmp/pulumi.tar.gz.9WvPvdOxMA
+ download_tarball
+ say_white + Downloading <https://github.com/pulumi/pulumi/releases/download/v3.94.2/pulumi-v3.94.2-linux-x64.tar.gz>...
+ [ -z  ]
+ printf %b%s%b\n \033[37;1m + Downloading <https://github.com/pulumi/pulumi/releases/download/v3.94.2/pulumi-v3.94.2-linux-x64.tar.gz>... \033[0m
+ Downloading <https://github.com/pulumi/pulumi/releases/download/v3.94.2/pulumi-v3.94.2-linux-x64.tar.gz>...
+ return 0
+ curl --fail -L --header Authorization: Bearer  -o /tmp/pulumi.tar.gz.9WvPvdOxMA <https://github.com/pulumi/pulumi/releases/download/v3.94.2/pulumi-v3.94.2-linux-x64.tar.gz>
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  147M  100  147M    0     0  13.1M      0  0:00:11  0:00:11 --:--:-- 16.7M
+ say_white + Extracting to /home/gl-540/.pulumi/bin
+ [ -z  ]
+ printf %b%s%b\n \033[37;1m + Extracting to /home/gl-540/.pulumi/bin \033[0m
+ Extracting to /home/gl-540/.pulumi/bin
+ return 0
+ [ -e /home/gl-540/.pulumi/bin/pulumi ]
+ mkdir -p /home/gl-540/.pulumi
+ mktemp -dt pulumi.XXXXXXXXXX
+ EXTRACT_DIR=/tmp/pulumi.Hizl8jCWJm
+ tar zxf /tmp/pulumi.tar.gz.9WvPvdOxMA -C /tmp/pulumi.Hizl8jCWJm

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
+ at_exit
+ [ 2 -ne 0 ]
+ say_red
+ printf %b%s%b\n \033[31;1m  \033[0m

+ say_red We're sorry, but it looks like something might have gone wrong during installation.
+ printf %b%s%b\n \033[31;1m We're sorry, but it looks like something might have gone wrong during installation. \033[0m
We're sorry, but it looks like something might have gone wrong during installation.
+ say_red If you need help, please join us on <https://slack.pulumi.com/>
+ printf %b%s%b\n \033[31;1m If you need help, please join us on <https://slack.pulumi.com/> \033[0m
If you need help, please join us on <https://slack.pulumi.com/>
d

dry-keyboard-94795

11/30/2023, 7:15 PM
The install error may be related to having
curl
installed via
snap
instead of
apt
. I'll find the related issue for the fix now
What version of node are you running?
I'll assume node 10.x as that's what Ubuntu provides through the ppa, which won't work. I'm unsure of the supported versions for Pulumi, I'd recommend sticking with the LTS release. It's better to use a tool like
nvm
or
volta
when using node. You can also use this PPA if you want to stick with apt, though this can potentially cause problems with system packages: https://github.com/nodesource/distributions/blob/master/README.md
l

little-iron-62790

11/30/2023, 8:36 PM
Thanks a lot @dry-keyboard-94795 that was really a fantastic support. All green now on my side.
d

dry-keyboard-94795

11/30/2023, 8:36 PM
Good to hear, happy to help